6.9: misc-additions: Move AMD_PRIVATE_COLOR to Kconfig
299b81f3e6
Following 9a9c013d25478c33421c04ca08e00a624c2b0db1
This commit is contained in:
parent
9a9c013d25
commit
2c761595bc
@ -110,3 +110,122 @@ index 180ac47868c2..42bf097b36b7 100644
|
|||||||
memset(&state->pp_display_cfg, 0, sizeof(state->pp_display_cfg));
|
memset(&state->pp_display_cfg, 0, sizeof(state->pp_display_cfg));
|
||||||
memset(&state->dcn_bw_vars, 0, sizeof(state->dcn_bw_vars));
|
memset(&state->dcn_bw_vars, 0, sizeof(state->dcn_bw_vars));
|
||||||
state->clk_mgr = NULL;
|
state->clk_mgr = NULL;
|
||||||
|
|
||||||
|
From 299b81f3e619aea3ceda77d7c42842a496b34a53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Jung <admin@ptr1337.dev>
|
||||||
|
Date: Thu, 21 Mar 2024 19:00:50 +0100
|
||||||
|
Subject: [PATCH] cachy: move AMD_PRIVATE_COLOR to Kconfig
|
||||||
|
|
||||||
|
Co-authored-by: PedroHLC <root@pedrohlc.com>
|
||||||
|
Signed-off-by: Peter Jung <admin@ptr1337.dev>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/amd/display/Kconfig | 6 ++++++
|
||||||
|
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
|
||||||
|
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +-
|
||||||
|
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 6 +++---
|
||||||
|
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 6 +++---
|
||||||
|
5 files changed, 14 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
|
||||||
|
index 901d1961b73927..05c49141f5802f 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/Kconfig
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/Kconfig
|
||||||
|
@@ -51,4 +51,10 @@ config DRM_AMD_SECURE_DISPLAY
|
||||||
|
This option enables the calculation of crc of specific region via
|
||||||
|
debugfs. Cooperate with specific DMCU FW.
|
||||||
|
|
||||||
|
+config AMD_PRIVATE_COLOR
|
||||||
|
+ bool "Enable KMS color management by AMD for AMD"
|
||||||
|
+ default n
|
||||||
|
+ help
|
||||||
|
+ This option extends the KMS color management API with AMD driver-specific properties to enhance the color management support on AMD Steam Deck.
|
||||||
|
+
|
||||||
|
endmenu
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
index 59d2eee72a3297..0a4e75de95c257 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
@@ -4078,7 +4078,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
if (amdgpu_dm_create_color_properties(adev))
|
||||||
|
return -ENOMEM;
|
||||||
|
#endif
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
|
||||||
|
index c87b64e464ed5c..6fe07243adc3d5 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
|
||||||
|
@@ -97,7 +97,7 @@ static inline struct fixed31_32 amdgpu_dm_fixpt_from_s3132(__u64 x)
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
/* Pre-defined Transfer Functions (TF)
|
||||||
|
*
|
||||||
|
* AMD driver supports pre-defined mathematical functions for transferring
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
|
||||||
|
index 6e715ef3a5566e..11c7199ec3b348 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
|
||||||
|
@@ -290,7 +290,7 @@ static int amdgpu_dm_crtc_late_register(struct drm_crtc *crtc)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
/**
|
||||||
|
* dm_crtc_additional_color_mgmt - enable additional color properties
|
||||||
|
* @crtc: DRM CRTC
|
||||||
|
@@ -372,7 +372,7 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
|
||||||
|
#if defined(CONFIG_DEBUG_FS)
|
||||||
|
.late_register = amdgpu_dm_crtc_late_register,
|
||||||
|
#endif
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
.atomic_set_property = amdgpu_dm_atomic_crtc_set_property,
|
||||||
|
.atomic_get_property = amdgpu_dm_atomic_crtc_get_property,
|
||||||
|
#endif
|
||||||
|
@@ -551,7 +551,7 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
|
||||||
|
|
||||||
|
drm_mode_crtc_set_gamma_size(&acrtc->base, MAX_COLOR_LEGACY_LUT_ENTRIES);
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
dm_crtc_additional_color_mgmt(&acrtc->base);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
|
||||||
|
index 8a4c40b4c27e4f..779880c6457553 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
|
||||||
|
@@ -1468,7 +1468,7 @@ static void amdgpu_dm_plane_drm_plane_destroy_state(struct drm_plane *plane,
|
||||||
|
drm_atomic_helper_plane_destroy_state(plane, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
static void
|
||||||
|
dm_atomic_plane_attach_color_mgmt_properties(struct amdgpu_display_manager *dm,
|
||||||
|
struct drm_plane *plane)
|
||||||
|
@@ -1659,7 +1659,7 @@ static const struct drm_plane_funcs dm_plane_funcs = {
|
||||||
|
.atomic_duplicate_state = amdgpu_dm_plane_drm_plane_duplicate_state,
|
||||||
|
.atomic_destroy_state = amdgpu_dm_plane_drm_plane_destroy_state,
|
||||||
|
.format_mod_supported = amdgpu_dm_plane_format_mod_supported,
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
.atomic_set_property = dm_atomic_plane_set_property,
|
||||||
|
.atomic_get_property = dm_atomic_plane_get_property,
|
||||||
|
#endif
|
||||||
|
@@ -1742,7 +1742,7 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
|
||||||
|
|
||||||
|
drm_plane_helper_add(plane, &dm_plane_helper_funcs);
|
||||||
|
|
||||||
|
-#ifdef AMD_PRIVATE_COLOR
|
||||||
|
+#ifdef CONFIG_AMD_PRIVATE_COLOR
|
||||||
|
dm_atomic_plane_attach_color_mgmt_properties(dm, plane);
|
||||||
|
#endif
|
||||||
|
/* Create (reset) the plane state */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user