drm/core: Calculate bpp in afbc helper
Some drivers (komeda, malidp) don't set anything in cpp. If that is the case the right value can be inferred from the format. Then the "bpp" member can be eliminated from struct drm_afbc_framebuffer. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200331155308.6345-3-andrzej.p@collabora.com
This commit is contained in:
@@ -331,13 +331,6 @@ struct drm_afbc_framebuffer {
|
||||
* @afbc_size: minimum size of afbc buffer
|
||||
*/
|
||||
u32 afbc_size;
|
||||
/**
|
||||
* @bpp: bpp value for this afbc buffer
|
||||
* To be removed when users such as malidp
|
||||
* properly store the cpp in drm_format_info.
|
||||
* New users should not start using this field.
|
||||
*/
|
||||
u32 bpp;
|
||||
};
|
||||
|
||||
#define fb_to_afbc_fb(x) container_of(x, struct drm_afbc_framebuffer, base)
|
||||
|
Reference in New Issue
Block a user