Merge tag 'topic/hdr-formats-2019-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-intel-next-queued
Add support for Y21x and Y41x to drm core and i915, and P01x support to i915. Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f2485309-d645-bed4-95f4-e66ff312aa05@linux.intel.com
This commit is contained in:
@@ -3975,7 +3975,7 @@ skl_ddb_get_hw_plane_state(struct drm_i915_private *dev_priv,
|
||||
val = I915_READ(PLANE_BUF_CFG(pipe, plane_id));
|
||||
val2 = I915_READ(PLANE_NV12_BUF_CFG(pipe, plane_id));
|
||||
|
||||
if (fourcc == DRM_FORMAT_NV12)
|
||||
if (is_planar_yuv_format(fourcc))
|
||||
swap(val, val2);
|
||||
|
||||
skl_ddb_entry_init_from_hw(dev_priv, ddb_y, val);
|
||||
@@ -4185,7 +4185,7 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
|
||||
if (intel_plane->id == PLANE_CURSOR)
|
||||
return 0;
|
||||
if (plane == 1 && format != DRM_FORMAT_NV12)
|
||||
if (plane == 1 && !is_planar_yuv_format(format))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
@@ -4197,7 +4197,7 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
height = drm_rect_height(&intel_pstate->base.src) >> 16;
|
||||
|
||||
/* UV plane does 1/2 pixel sub-sampling */
|
||||
if (plane == 1 && format == DRM_FORMAT_NV12) {
|
||||
if (plane == 1 && is_planar_yuv_format(format)) {
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
}
|
||||
@@ -4594,9 +4594,9 @@ skl_compute_plane_wm_params(const struct intel_crtc_state *cstate,
|
||||
const struct drm_framebuffer *fb = pstate->fb;
|
||||
u32 interm_pbpl;
|
||||
|
||||
/* only NV12 format has two planes */
|
||||
if (color_plane == 1 && fb->format->format != DRM_FORMAT_NV12) {
|
||||
DRM_DEBUG_KMS("Non NV12 format have single plane\n");
|
||||
/* only planar format has two planes */
|
||||
if (color_plane == 1 && !is_planar_yuv_format(fb->format->format)) {
|
||||
DRM_DEBUG_KMS("Non planar format have single plane\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -4607,7 +4607,7 @@ skl_compute_plane_wm_params(const struct intel_crtc_state *cstate,
|
||||
wp->x_tiled = fb->modifier == I915_FORMAT_MOD_X_TILED;
|
||||
wp->rc_surface = fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
|
||||
fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS;
|
||||
wp->is_planar = fb->format->format == DRM_FORMAT_NV12;
|
||||
wp->is_planar = is_planar_yuv_format(fb->format->format);
|
||||
|
||||
if (plane->id == PLANE_CURSOR) {
|
||||
wp->width = intel_pstate->base.crtc_w;
|
||||
|
Reference in New Issue
Block a user