mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
linux: update i915 passthrough colors patch
This commit is contained in:
parent
1b0cce91fe
commit
7ff9c5a719
@ -1,8 +1,8 @@
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index 0a4b42d..b3aa01e 100644
|
||||
index e1f7c97..d99e406 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -3896,6 +3896,7 @@ __raw_write(64, q)
|
||||
@@ -4044,6 +4044,7 @@ __raw_write(64, q)
|
||||
#define INTEL_BROADCAST_RGB_AUTO 0
|
||||
#define INTEL_BROADCAST_RGB_FULL 1
|
||||
#define INTEL_BROADCAST_RGB_LIMITED 2
|
||||
@ -11,10 +11,10 @@ index 0a4b42d..b3aa01e 100644
|
||||
static inline i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 344f238..1143551 100644
|
||||
index d93efb4..0de8a5e 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -563,6 +563,13 @@ struct intel_crtc_state {
|
||||
@@ -652,6 +652,13 @@ struct intel_crtc_state {
|
||||
*/
|
||||
bool limited_color_range;
|
||||
|
||||
@ -28,19 +28,11 @@ index 344f238..1143551 100644
|
||||
/* Bitmask of encoder types (enum intel_output_type)
|
||||
* driven by the pipe.
|
||||
*/
|
||||
@@ -840,6 +847,7 @@ struct intel_hdmi {
|
||||
} dp_dual_mode;
|
||||
bool limited_color_range;
|
||||
bool color_range_auto;
|
||||
+ bool color_range_video;
|
||||
bool has_hdmi_sink;
|
||||
bool has_audio;
|
||||
enum hdmi_force_audio force_audio;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
index ebae2bd..ed925e5 100644
|
||||
index ec0779a..42fd4e5 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
|
||||
@@ -469,7 +469,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
|
||||
@@ -470,7 +470,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
|
||||
}
|
||||
|
||||
drm_hdmi_avi_infoframe_quant_range(&frame.avi, adjusted_mode,
|
||||
@ -49,52 +41,15 @@ index ebae2bd..ed925e5 100644
|
||||
HDMI_QUANTIZATION_RANGE_LIMITED :
|
||||
HDMI_QUANTIZATION_RANGE_FULL,
|
||||
intel_hdmi->rgb_quant_range_selectable);
|
||||
@@ -1336,6 +1336,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
|
||||
pipe_config->limited_color_range =
|
||||
intel_hdmi->limited_color_range;
|
||||
@@ -1370,6 +1370,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
|
||||
intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_LIMITED;
|
||||
}
|
||||
+ if (intel_hdmi->color_range_video)
|
||||
+ pipe_config->video_color_range = true;
|
||||
|
||||
+ pipe_config->video_color_range = (intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_VIDEO);
|
||||
+
|
||||
if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) {
|
||||
pipe_config->pixel_multiplier = 2;
|
||||
@@ -1593,25 +1595,35 @@ intel_hdmi_set_property(struct drm_connector *connector,
|
||||
if (property == dev_priv->broadcast_rgb_property) {
|
||||
bool old_auto = intel_hdmi->color_range_auto;
|
||||
bool old_range = intel_hdmi->limited_color_range;
|
||||
+ bool old_range_video = intel_hdmi->color_range_video;
|
||||
|
||||
switch (val) {
|
||||
case INTEL_BROADCAST_RGB_AUTO:
|
||||
intel_hdmi->color_range_auto = true;
|
||||
+ intel_hdmi->color_range_video = false;
|
||||
break;
|
||||
case INTEL_BROADCAST_RGB_FULL:
|
||||
intel_hdmi->color_range_auto = false;
|
||||
intel_hdmi->limited_color_range = false;
|
||||
+ intel_hdmi->color_range_video = false;
|
||||
break;
|
||||
case INTEL_BROADCAST_RGB_LIMITED:
|
||||
intel_hdmi->color_range_auto = false;
|
||||
intel_hdmi->limited_color_range = true;
|
||||
+ intel_hdmi->color_range_video = false;
|
||||
+ break;
|
||||
+ case INTEL_BROADCAST_RGB_VIDEO:
|
||||
+ intel_hdmi->color_range_auto = false;
|
||||
+ intel_hdmi->limited_color_range = false;
|
||||
+ intel_hdmi->color_range_video = true;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (old_auto == intel_hdmi->color_range_auto &&
|
||||
- old_range == intel_hdmi->limited_color_range)
|
||||
+ old_range == intel_hdmi->limited_color_range &&
|
||||
+ old_range_video == intel_hdmi->color_range_video)
|
||||
return 0;
|
||||
|
||||
goto done;
|
||||
clock_8bpc *= 2;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
|
||||
index 951e834..d817558 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_modes.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user