Lines 104-110
struct intel_sdvo {
Link Here
|
104 |
* It is only valid when using TMDS encoding and 8 bit per color mode. |
104 |
* It is only valid when using TMDS encoding and 8 bit per color mode. |
105 |
*/ |
105 |
*/ |
106 |
uint32_t color_range; |
106 |
uint32_t color_range; |
107 |
bool color_range_auto; |
|
|
108 |
|
107 |
|
109 |
/** |
108 |
/** |
110 |
* This is set if we're going to treat the device as TV-out. |
109 |
* This is set if we're going to treat the device as TV-out. |
Lines 1156-1173
static bool intel_sdvo_compute_config(struct intel_encoder *encoder,
Link Here
|
1156 |
|
1155 |
|
1157 |
pipe_config->has_hdmi_sink = intel_sdvo->has_hdmi_monitor; |
1156 |
pipe_config->has_hdmi_sink = intel_sdvo->has_hdmi_monitor; |
1158 |
|
1157 |
|
1159 |
if (intel_sdvo->color_range_auto) { |
1158 |
if (pipe_config->has_hdmi_sink && |
1160 |
/* See CEA-861-E - 5.1 Default Encoding Parameters */ |
1159 |
intel_sdvo->color_range == HDMI_COLOR_RANGE_16_235) |
1161 |
/* FIXME: This bit is only valid when using TMDS encoding and 8 |
1160 |
pipe_config->limited_color_range = true; |
1162 |
* bit per color mode. */ |
|
|
1163 |
if (pipe_config->has_hdmi_sink && |
1164 |
drm_match_cea_mode(adjusted_mode) > 1) |
1165 |
pipe_config->limited_color_range = true; |
1166 |
} else { |
1167 |
if (pipe_config->has_hdmi_sink && |
1168 |
intel_sdvo->color_range == HDMI_COLOR_RANGE_16_235) |
1169 |
pipe_config->limited_color_range = true; |
1170 |
} |
1171 |
|
1161 |
|
1172 |
/* Clock computation needs to happen after pixel multiplier. */ |
1162 |
/* Clock computation needs to happen after pixel multiplier. */ |
1173 |
if (intel_sdvo->is_tv) |
1163 |
if (intel_sdvo->is_tv) |
Lines 2058-2086
intel_sdvo_set_property(struct drm_connector *connector,
Link Here
|
2058 |
} |
2048 |
} |
2059 |
|
2049 |
|
2060 |
if (property == dev_priv->broadcast_rgb_property) { |
2050 |
if (property == dev_priv->broadcast_rgb_property) { |
2061 |
bool old_auto = intel_sdvo->color_range_auto; |
|
|
2062 |
uint32_t old_range = intel_sdvo->color_range; |
2051 |
uint32_t old_range = intel_sdvo->color_range; |
2063 |
|
2052 |
|
2064 |
switch (val) { |
2053 |
switch (val) { |
2065 |
case INTEL_BROADCAST_RGB_AUTO: |
|
|
2066 |
intel_sdvo->color_range_auto = true; |
2067 |
break; |
2068 |
case INTEL_BROADCAST_RGB_FULL: |
2054 |
case INTEL_BROADCAST_RGB_FULL: |
2069 |
intel_sdvo->color_range_auto = false; |
|
|
2070 |
intel_sdvo->color_range = 0; |
2055 |
intel_sdvo->color_range = 0; |
2071 |
break; |
2056 |
break; |
2072 |
case INTEL_BROADCAST_RGB_LIMITED: |
2057 |
case INTEL_BROADCAST_RGB_LIMITED: |
2073 |
intel_sdvo->color_range_auto = false; |
|
|
2074 |
/* FIXME: this bit is only valid when using TMDS |
2075 |
* encoding and 8 bit per color mode. */ |
2076 |
intel_sdvo->color_range = HDMI_COLOR_RANGE_16_235; |
2058 |
intel_sdvo->color_range = HDMI_COLOR_RANGE_16_235; |
2077 |
break; |
2059 |
break; |
2078 |
default: |
2060 |
default: |
2079 |
return -EINVAL; |
2061 |
return -EINVAL; |
2080 |
} |
2062 |
} |
2081 |
|
2063 |
|
2082 |
if (old_auto == intel_sdvo->color_range_auto && |
2064 |
if (old_range == intel_sdvo->color_range) |
2083 |
old_range == intel_sdvo->color_range) |
|
|
2084 |
return 0; |
2065 |
return 0; |
2085 |
|
2066 |
|
2086 |
goto done; |
2067 |
goto done; |
Lines 2421-2427
intel_sdvo_add_hdmi_properties(struct intel_sdvo *intel_sdvo,
Link Here
|
2421 |
intel_attach_force_audio_property(&connector->base.base); |
2402 |
intel_attach_force_audio_property(&connector->base.base); |
2422 |
if (INTEL_INFO(dev)->gen >= 4 && IS_MOBILE(dev)) { |
2403 |
if (INTEL_INFO(dev)->gen >= 4 && IS_MOBILE(dev)) { |
2423 |
intel_attach_broadcast_rgb_property(&connector->base.base); |
2404 |
intel_attach_broadcast_rgb_property(&connector->base.base); |
2424 |
intel_sdvo->color_range_auto = true; |
2405 |
intel_sdvo->color_range = 0; |
2425 |
} |
2406 |
} |
2426 |
} |
2407 |
} |
2427 |
|
2408 |
|