aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
new file mode 100644
index 00000000..d6e0cd94
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0818-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
@@ -0,0 +1,57 @@
+From 260e39148d1b57e4dae1be975181d1fb5293e03f Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Thu, 15 Nov 2018 17:19:12 -0500
+Subject: [PATCH 0818/2940] drm/amdgpu: Add amdgpu "max bpc" connector property
+ (v2)
+
+[Why]
+Many panels support more than 8bpc but some modes are unavailable while
+running at greater than 8bpc due to DP/HDMI bandwidth constraints.
+
+Support for more than 8bpc was added recently in the driver but it
+defaults to the maximum supported bpc - locking out these modes.
+
+This should be a user configurable option such that the user can select
+what bpc configuration they would like.
+
+[How]
+This patch introduces the "max bpc" amdgpu driver specific connector
+property so the user can limit the maximum bpc. It ranges from 8 to 16.
+
+This doesn't directly set the preferred bpc for the panel since it
+follows Intel's existing driver conventions.
+
+This proprety should be removed once common drm support for max bpc
+lands.
+
+v2: rebase on upstream (Alex)
+
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+index cadca8bd4f0e..7d2931595043 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+@@ -646,6 +646,13 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev)
+ return -ENOMEM;
+ }
+
++ if (amdgpu_device_has_dc_support(adev)) {
++ adev->mode_info.max_bpc_property =
++ drm_property_create_range(adev->ddev, 0, "max bpc", 8, 16);
++ if (!adev->mode_info.max_bpc_property)
++ return -ENOMEM;
++ }
++
+ return 0;
+ }
+
+--
+2.17.1
+