Hello All, Please find a proposed workaround patch for a weathered colours (incorrect assignment to Limited RGB setting) issue. The weathered colour issue is documented at: https://bugs.archlinux.org/task/46472 https://wiki.archlinux.org/index.php/Intel_graphics#Weathered_colors_.28color_range_problem.29 https://losca.blogspot.com.au/2013/11/workaround-for-setting-full-rgb-when.html This patch, which I have shared with Jesse Barnes, provides a kernel command line option "i915.rgb_mode" with two usable options: i915.rgb_mode=1 gives forced Full RGB Mode; i915.rgb_mode=2 gives forced Limited RGB Mode. Any other value passed to i915.rgb_mode will call the default Automatic RGB mode. A limitation of this patch is that the KMS framebuffer needs to be interrupted, such as occurs when xorg-server starts. i.e. if xorg-server were not to be started, the weathered colour issue remains in effect, even with a switch from one tty to another. For reference, the machine that I am testing on is a 4770k (Haswell, Core i7). I am investigating the issue further to improve this workaround so that the change from KMS to xorg-server is not required for the patch to come into effect. I have tested this patch on Debian Testing. -Damien Sticklen |
diff -ruN linux-4.8.1/drivers/gpu/drm/i915/i915_params.c linux-4.8.1-patched/drivers/gpu/drm/i915/i915_params.c --- linux-4.8.1/drivers/gpu/drm/i915/i915_params.c 2016-10-07 21:03:33.000000000 +0800 +++ linux-4.8.1-patched/drivers/gpu/drm/i915/i915_params.c 2016-10-18 21:36:12.051442687 +0800 @@ -54,6 +54,7 @@ .verbose_state_checks = 1, .nuclear_pageflip = 0, .edp_vswing = 0, + .rgb_mode = 0, .enable_guc_loading = 0, .enable_guc_submission = 0, .guc_log_level = -1, @@ -200,6 +201,10 @@ "(0=use value from vbt [default], 1=low power swing(200mV)," "2=default swing(400mV))"); +/* Override for the RGB Mode Auto detection that was introduced in Linux 3.8. This will provide the user with FULL, and LIMITED on the kernel commandline */ +module_param_named(rgb_mode, i915.rgb_mode, int, 0400); +MODULE_PARM_DESC(rgb_mode, "Override RGB Mode (1=Full RGB MODE, 2=Limited RGB Mode; Default: 0 (Automatic RGB Mode - Lets the driver select))"); + module_param_named_unsafe(enable_guc_loading, i915.enable_guc_loading, int, 0400); MODULE_PARM_DESC(enable_guc_loading, "Enable GuC firmware loading " diff -ruN linux-4.8.1/drivers/gpu/drm/i915/i915_params.h linux-4.8.1-patched/drivers/gpu/drm/i915/i915_params.h --- linux-4.8.1/drivers/gpu/drm/i915/i915_params.h 2016-10-07 21:03:33.000000000 +0800 +++ linux-4.8.1-patched/drivers/gpu/drm/i915/i915_params.h 2016-10-18 21:36:12.059442587 +0800 @@ -51,6 +51,7 @@ int use_mmio_flip; int mmio_debug; int edp_vswing; + int rgb_mode; /* Do not allow the kernel to select the output color width */ unsigned int inject_load_failure; /* leave bools at the end to not create holes */ bool enable_hangcheck; diff -ruN linux-4.8.1/drivers/gpu/drm/i915/intel_hdmi.c linux-4.8.1-patched/drivers/gpu/drm/i915/intel_hdmi.c --- linux-4.8.1/drivers/gpu/drm/i915/intel_hdmi.c 2016-10-07 21:03:33.000000000 +0800 +++ linux-4.8.1-patched/drivers/gpu/drm/i915/intel_hdmi.c 2016-10-18 21:36:12.059442587 +0800 @@ -1585,7 +1585,22 @@ goto done; } + /* Implement the RGB Override specified on the kernel command line*/ if (property == dev_priv->broadcast_rgb_property) { + if (i915.rgb_mode == 1) { + intel_hdmi->color_range_auto = false; + intel_hdmi->limited_color_range = false; + + goto done; + } + else if (i915.rgb_mode == 2) { + intel_hdmi->color_range_auto = false; + intel_hdmi->limited_color_range = true; + + goto done; + } + + /* If an override option is not provided in the kernel commandline, let the driver select the mode */ bool old_auto = intel_hdmi->color_range_auto; bool old_range = intel_hdmi->limited_color_range;
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx