diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-11-18 20:53:05 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-15 13:55:33 +0100 |
commit | 8f8f6a6c3cbe14406780a90e89d7d8742493913c (patch) | |
tree | 21b6e712c5e20593e460d09e47ed80a8fe55a44b /include/drm/drm_framebuffer.h | |
parent | drm/i915: Store a pointer to the pixel format info for fbc (diff) | |
download | linux-8f8f6a6c3cbe14406780a90e89d7d8742493913c.tar.xz linux-8f8f6a6c3cbe14406780a90e89d7d8742493913c.zip |
drm: Add drm_framebuffer_plane_{width,height}()
Add variants of drm_format_plane_{width,height}() that take an entire fb
object instead of just the format. These should be more efficent as they
can just look up the format info from the fb->format pointer rather than
having to look it up (using a linear search based on the format).
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to '')
-rw-r--r-- | include/drm/drm_framebuffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h index a3d2f25230a8..79640c3e7ec4 100644 --- a/include/drm/drm_framebuffer.h +++ b/include/drm/drm_framebuffer.h @@ -286,4 +286,10 @@ static inline void drm_framebuffer_assign(struct drm_framebuffer **p, struct drm_framebuffer, head); \ &fb->head != (&(dev)->mode_config.fb_list); \ fb = list_next_entry(fb, head)) + +int drm_framebuffer_plane_width(int width, + const struct drm_framebuffer *fb, int plane); +int drm_framebuffer_plane_height(int height, + const struct drm_framebuffer *fb, int plane); + #endif |