OSDN Git Service

drm/i915/gen11: Program the scalers correctly for planar formats, v3.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 18 Oct 2018 11:51:31 +0000 (13:51 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 24 Oct 2018 08:30:14 +0000 (10:30 +0200)
commitb1554e23ccb6d8e611c5d54ca94bb2dfc54cae72
tree5efd38ab8a36dbf85824fb645fa2b21d6783f0a1
parentb048a00b3d9635141c7b1d4eabf6cff869a92238
drm/i915/gen11: Program the scalers correctly for planar formats, v3.

The first 3 planes (primary, sprite 0 and 1) have a dedicated chroma
upsampler to upscale YUV420 to YUV444 and the scaler should only be
used for upscaling. Because of this we shouldn't program the scalers
in planar mode if NV12 and the chroma upsampler are used. Instead
program the scalers like on normal planes.

Sprite 2 and 3 have no dedicated scaler, and need to program the
selected Y plane in the scaler mode.

Changes since v1:
- Make the comment less confusing.
Changes since v2:
- Fix checkpatch warning (Matt)
- gen10- -> Pre-gen11 (Ville)
- PS_SCALER_MODE_PACKED -> PS_SCALER_MODE_NORMAL. (Matt)
- Add comment about scaler mode in intel_atomic_setup_scaler(). (Matt)
- Rename need_scaling to need_scaler. (Matt)
- Move the crtc need_scaling check to skl_update_scaler_crtc().

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181018115134.9061-6-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_atomic.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c