]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check fb stride against plane max stride
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 18 Sep 2018 14:02:43 +0000 (17:02 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 25 Sep 2018 17:54:35 +0000 (20:54 +0300)
commit099ac5c8840df1a5e00b73468fbe29f6fe98a65f
tree0bfcc4a1f3c99b51f852dc2e69e9ba31827698b0
parentdca55cf7811cf571bb1cb0fd6024fa9c1a3974b6
drm/i915: Check fb stride against plane max stride

commit 62ecaf16e142 ("drm/i915: Extract per-platform plane->check()
functions") removed the plane max stride check for sprite planes.
I was going to add it back when introducing GTT remapping for the
display, but after further thought it seems better to re-introduce
it separately.

So let's add the max stride check back. And let's do it in a nicer
form than what we had before and do it for all plane types (easy
now that we have the ->max_stride() plane vfunc).

Only sprite planes really need this for now since primary planes
are capable of scanning out the current max fb size we allow, and
cursors have more stringent stride checks elsewhere.

Cc: José Roberto de Souza <jose.souza@intel.com>
Fixes: 62ecaf16e142 ("drm/i915: Extract per-platform plane->check() functions")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180918140243.12207-1-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c