mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 10:11:38 -04:00
drm/amd/display: Hook up colorop destroy helper for plane pipelines
Provide a drm_colorop_funcs instance for amdgpu_dm color pipeline objects and hook up the common drm_colorop_destroy() helper as the destroy callback. Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260202094202.2871478-4-chaitanya.kumar.borah@intel.com
This commit is contained in:
committed by
Suraj Kandpal
parent
2864667476
commit
3f85dd9b8a
@@ -55,6 +55,10 @@ const u64 amdgpu_dm_supported_blnd_tfs =
|
||||
|
||||
#define LUT3D_SIZE 17
|
||||
|
||||
static const struct drm_colorop_funcs dm_colorop_funcs = {
|
||||
.destroy = drm_colorop_destroy,
|
||||
};
|
||||
|
||||
int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_prop_enum_list *list)
|
||||
{
|
||||
struct drm_colorop *ops[MAX_COLOR_PIPELINE_OPS];
|
||||
@@ -72,7 +76,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, &dm_colorop_funcs,
|
||||
amdgpu_dm_supported_degam_tfs,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
@@ -89,7 +93,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_mult_init(dev, ops[i], plane, NULL, DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
ret = drm_plane_colorop_mult_init(dev, ops[i], plane, &dm_colorop_funcs,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
|
||||
@@ -104,7 +109,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane, NULL,
|
||||
ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane,
|
||||
&dm_colorop_funcs,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
@@ -121,7 +127,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, &dm_colorop_funcs,
|
||||
amdgpu_dm_supported_shaper_tfs,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
@@ -138,7 +144,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane, NULL,
|
||||
ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane,
|
||||
&dm_colorop_funcs,
|
||||
MAX_COLOR_LUT_ENTRIES,
|
||||
DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
@@ -156,7 +163,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_3dlut_init(dev, ops[i], plane, NULL, LUT3D_SIZE,
|
||||
ret = drm_plane_colorop_3dlut_init(dev, ops[i], plane,
|
||||
&dm_colorop_funcs, LUT3D_SIZE,
|
||||
DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
@@ -174,7 +182,7 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, NULL,
|
||||
ret = drm_plane_colorop_curve_1d_init(dev, ops[i], plane, &dm_colorop_funcs,
|
||||
amdgpu_dm_supported_blnd_tfs,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
@@ -191,7 +199,8 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane, NULL, MAX_COLOR_LUT_ENTRIES,
|
||||
ret = drm_plane_colorop_curve_1d_lut_init(dev, ops[i], plane, &dm_colorop_funcs,
|
||||
MAX_COLOR_LUT_ENTRIES,
|
||||
DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR,
|
||||
DRM_COLOROP_FLAG_ALLOW_BYPASS);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user