OSDN Git Service

drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Thu, 1 Nov 2018 15:11:31 +0000 (15:11 +0000)
committerAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Fri, 2 Nov 2018 09:57:40 +0000 (09:57 +0000)
commit8db2dc852941cf1bc9ea22b4ba5c14b8c9ab7194
tree325602f0be0fc353c92be40d5266f2a25f2d9d76
parent55bc277d122402f3ee9f16cb037ec9a9ccd601e9
drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0

For formats that are supported only with non-linear modifiers it
doesn't make to much sense to define cpp or char_per_block, so that
will be set to 0.

This patch adds a restriction to force having a modifier attached when
cpp/char_per_block is 0, and to bypass checking the pitch restriction.

This had been discussed here.
[1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2018-09-13&show_html=true

Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-5-alexandru-cosmin.gheorghe@arm.com
drivers/gpu/drm/drm_framebuffer.c