mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
drm/tegra: Add blend mode properties
The default programming in the driver matches the "coverage" blend mode, so add the corresponding pixel blend mode property to let userspace know about it. Tested-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260826105421.1825331-1-thierry.reding@kernel.org
This commit is contained in:
parent
2d2a3adc91
commit
20839d02c0
|
|
@ -904,6 +904,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
|
|||
struct tegra_dc *dc)
|
||||
{
|
||||
unsigned long possible_crtcs = tegra_plane_get_possible_crtcs(drm);
|
||||
unsigned int blend_caps = BIT(DRM_MODE_BLEND_COVERAGE);
|
||||
enum drm_plane_type type = DRM_PLANE_TYPE_PRIMARY;
|
||||
struct tegra_plane *plane;
|
||||
unsigned int num_formats;
|
||||
|
|
@ -939,6 +940,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
|
|||
}
|
||||
|
||||
drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
|
||||
drm_plane_create_blend_mode_property(&plane->base, blend_caps);
|
||||
drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
|
||||
|
||||
err = drm_plane_create_rotation_property(&plane->base,
|
||||
|
|
@ -1209,6 +1211,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
|
|||
struct tegra_dc *dc)
|
||||
{
|
||||
unsigned long possible_crtcs = tegra_plane_get_possible_crtcs(drm);
|
||||
unsigned int blend_caps = BIT(DRM_MODE_BLEND_COVERAGE);
|
||||
struct tegra_plane *plane;
|
||||
unsigned int num_formats;
|
||||
const u32 *formats;
|
||||
|
|
@ -1252,6 +1255,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
|
|||
}
|
||||
|
||||
drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
|
||||
drm_plane_create_blend_mode_property(&plane->base, blend_caps);
|
||||
drm_plane_create_zpos_immutable_property(&plane->base, 255);
|
||||
|
||||
return &plane->base;
|
||||
|
|
@ -1356,6 +1360,7 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
|
|||
bool cursor)
|
||||
{
|
||||
unsigned long possible_crtcs = tegra_plane_get_possible_crtcs(drm);
|
||||
unsigned int blend_caps = BIT(DRM_MODE_BLEND_COVERAGE);
|
||||
struct tegra_plane *plane;
|
||||
unsigned int num_formats;
|
||||
enum drm_plane_type type;
|
||||
|
|
@ -1394,6 +1399,7 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
|
|||
}
|
||||
|
||||
drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
|
||||
drm_plane_create_blend_mode_property(&plane->base, blend_caps);
|
||||
drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
|
||||
|
||||
err = drm_plane_create_rotation_property(&plane->base,
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ struct drm_plane *tegra_shared_plane_create(struct drm_device *drm,
|
|||
unsigned int index,
|
||||
enum drm_plane_type type)
|
||||
{
|
||||
unsigned int blend_caps = BIT(DRM_MODE_BLEND_COVERAGE);
|
||||
struct tegra_drm *tegra = drm->dev_private;
|
||||
struct tegra_display_hub *hub = tegra->hub;
|
||||
struct tegra_shared_plane *plane;
|
||||
|
|
@ -797,6 +798,7 @@ struct drm_plane *tegra_shared_plane_create(struct drm_device *drm,
|
|||
}
|
||||
|
||||
drm_plane_helper_add(p, &tegra_shared_plane_helper_funcs);
|
||||
drm_plane_create_blend_mode_property(p, blend_caps);
|
||||
drm_plane_create_zpos_property(p, 0, 0, 255);
|
||||
|
||||
return p;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user