Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-01-18 15:25:50 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2019-01-18 17:08:08 +0100
commite5e69d586163b9946454438e37f45cd34b3e884f (patch)
treefe6f3aeb21cb870ccaeab9d58745eb685177917b
parentd9d6b3a86ca47dc12ade84b62937d3fb752cba65 (diff)
drm/amdgpu: Add amdgpu "max bpc" connector property (v2) (bsc#1113956)
-rw-r--r--patches.drm/0001-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch74
-rw-r--r--series.conf1
2 files changed, 75 insertions, 0 deletions
diff --git a/patches.drm/0001-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch b/patches.drm/0001-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
new file mode 100644
index 0000000000..ce35e5d6a7
--- /dev/null
+++ b/patches.drm/0001-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
@@ -0,0 +1,74 @@
+From e2306cc6a07aefc458982b3d7ae1e146515ed656 Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Thu, 15 Nov 2018 17:19:12 -0500
+Subject: drm/amdgpu: Add amdgpu "max bpc" connector property (v2)
+Git-commit: e2306cc6a07aefc458982b3d7ae1e146515ed656
+Patch-mainline: v5.0-rc1
+References: bsc#1113956
+
+[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>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 +++++++
+ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 ++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+index 6748cd7fc129..686a26de50f9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+@@ -626,6 +626,13 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev)
+ "dither",
+ amdgpu_dither_enum_list, sz);
+
++ 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;
+ }
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+index 11723d8fffbd..0dc2c5c57015 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+@@ -338,6 +338,8 @@ struct amdgpu_mode_info {
+ struct drm_property *audio_property;
+ /* FMT dithering */
+ struct drm_property *dither_property;
++ /* maximum number of bits per channel for monitor color */
++ struct drm_property *max_bpc_property;
+ /* hardcoded DFP edid from BIOS */
+ struct edid *bios_hardcoded_edid;
+ int bios_hardcoded_edid_size;
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 51c1cc39b8..6d6cbf3ad7 100644
--- a/series.conf
+++ b/series.conf
@@ -42108,6 +42108,7 @@
patches.drm/0001-drm-rcar-du-Fix-vblank-initialization.patch
patches.drm/0001-drm-rcar-du-Fix-external-clock-error-checks.patch
patches.drm/0001-drm-i915-vgpu-Disallow-loading-on-old-vGPU-hosts.patch
+ patches.drm/0001-drm-amdgpu-Add-amdgpu-max-bpc-connector-property-v2.patch
patches.drm/0087-drm-v3d-Fix-prime-imports-of-buffers-from-other-driv.patch
patches.drivers/ALSA-usb-audio-Define-registers-for-CM6206.patch
patches.drivers/ALSA-hda-ca0132-Optimize-for-non-PCI-configuration.patch