drm/i915: add immutable zpos plane properties
This adds basic immutable support for the zpos property. The zpos increases from bottom to top: primary, sprites, cursor. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [contact@emersion.fr: adapted for latest drm-tip] Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patchwork.freedesktop.org/patch/msgid/YSH9PasoADJJdNJCSdI4m55ankIBsCaoSgkw-NQ5dlruCAxc8J-SQwVl5n3ddSAMDLTdbdyQvkONmtbjkUU-TQk5VIu1p-aZRO1OjjuSxjY=@emersion.fr Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
This commit is contained in:
parent
a8c15954d6
commit
ca9cab1834
@ -14887,7 +14887,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
|
|||||||
const u64 *modifiers;
|
const u64 *modifiers;
|
||||||
const u32 *formats;
|
const u32 *formats;
|
||||||
int num_formats;
|
int num_formats;
|
||||||
int ret;
|
int ret, zpos;
|
||||||
|
|
||||||
if (INTEL_GEN(dev_priv) >= 9)
|
if (INTEL_GEN(dev_priv) >= 9)
|
||||||
return skl_universal_plane_create(dev_priv, pipe,
|
return skl_universal_plane_create(dev_priv, pipe,
|
||||||
@ -14976,6 +14976,9 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
|
|||||||
DRM_MODE_ROTATE_0,
|
DRM_MODE_ROTATE_0,
|
||||||
supported_rotations);
|
supported_rotations);
|
||||||
|
|
||||||
|
zpos = 0;
|
||||||
|
drm_plane_create_zpos_immutable_property(&plane->base, zpos);
|
||||||
|
|
||||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||||
|
|
||||||
return plane;
|
return plane;
|
||||||
@ -14992,7 +14995,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
|
|||||||
{
|
{
|
||||||
unsigned int possible_crtcs;
|
unsigned int possible_crtcs;
|
||||||
struct intel_plane *cursor;
|
struct intel_plane *cursor;
|
||||||
int ret;
|
int ret, zpos;
|
||||||
|
|
||||||
cursor = intel_plane_alloc();
|
cursor = intel_plane_alloc();
|
||||||
if (IS_ERR(cursor))
|
if (IS_ERR(cursor))
|
||||||
@ -15041,6 +15044,9 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
|
|||||||
DRM_MODE_ROTATE_0 |
|
DRM_MODE_ROTATE_0 |
|
||||||
DRM_MODE_ROTATE_180);
|
DRM_MODE_ROTATE_180);
|
||||||
|
|
||||||
|
zpos = RUNTIME_INFO(dev_priv)->num_sprites[pipe] + 1;
|
||||||
|
drm_plane_create_zpos_immutable_property(&cursor->base, zpos);
|
||||||
|
|
||||||
drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
|
drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
|
||||||
|
|
||||||
return cursor;
|
return cursor;
|
||||||
|
@ -2592,6 +2592,8 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
|
|||||||
BIT(DRM_MODE_BLEND_PREMULTI) |
|
BIT(DRM_MODE_BLEND_PREMULTI) |
|
||||||
BIT(DRM_MODE_BLEND_COVERAGE));
|
BIT(DRM_MODE_BLEND_COVERAGE));
|
||||||
|
|
||||||
|
drm_plane_create_zpos_immutable_property(&plane->base, plane_id);
|
||||||
|
|
||||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||||
|
|
||||||
return plane;
|
return plane;
|
||||||
@ -2613,7 +2615,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
|
|||||||
const u64 *modifiers;
|
const u64 *modifiers;
|
||||||
const u32 *formats;
|
const u32 *formats;
|
||||||
int num_formats;
|
int num_formats;
|
||||||
int ret;
|
int ret, zpos;
|
||||||
|
|
||||||
if (INTEL_GEN(dev_priv) >= 9)
|
if (INTEL_GEN(dev_priv) >= 9)
|
||||||
return skl_universal_plane_create(dev_priv, pipe,
|
return skl_universal_plane_create(dev_priv, pipe,
|
||||||
@ -2703,6 +2705,9 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
|
|||||||
DRM_COLOR_YCBCR_BT709,
|
DRM_COLOR_YCBCR_BT709,
|
||||||
DRM_COLOR_YCBCR_LIMITED_RANGE);
|
DRM_COLOR_YCBCR_LIMITED_RANGE);
|
||||||
|
|
||||||
|
zpos = sprite + 1;
|
||||||
|
drm_plane_create_zpos_immutable_property(&plane->base, zpos);
|
||||||
|
|
||||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||||
|
|
||||||
return plane;
|
return plane;
|
||||||
|
Loading…
Reference in New Issue
Block a user