diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-28 14:30:28 (GMT) |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-08-11 15:35:23 (GMT) |
commit | 8d970654b767ebe8aeb524d30e27b37c0cb8eaed (patch) | |
tree | f1441e57997a819b2664a00ca72c0ff871131fe7 /drivers/watchdog/mpc8xxx_wdt.c | |
parent | b63a16f6cd8911e74816a307f8078e29564eadc0 (diff) | |
download | linux-8d970654b767ebe8aeb524d30e27b37c0cb8eaed.tar.xz |
drm/i915: Deal with NV12 CbCr plane AUX surface on SKL+
With NV12 we have two color planes to deal with so we must compute the
surface and x/y offsets for the second plane as well.
What makes this a bit nasty is that the hardware expects the surface
offset to be specified as a distance from the main surface offset.
What's worse, the distance must be non-negative (no neat wraparound or
anything). So we must make sure that the main surface offset is always
less or equal to the AUX surface offset. We do that by computing the AUX
offset first and the main surface offset second. If the main surface
offset ends up being above the AUX offset, we just push it down as far
as is required while still maintaining the required alignment etc.
Fortunately the AUX offset only reuqires 4K alignment, so we don't need
to do any of the backwards searching for an acceptable offset that we
must do for the main surface. And X tiled + NV12 isn't a supported
combination anyway.
Note that this just computes aux surface offsets, we do not yet program
them into the actual hardware registers, and hence we can't yet expose
NV12.
v2: Rebase due to drm_plane_state src/dst rects
s/TODO.../something else/ in the commit message/ (Daniel)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470821001-25272-12-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/watchdog/mpc8xxx_wdt.c')
0 files changed, 0 insertions, 0 deletions