drm/i915: Provide ddc symlink in hdmi connector sysfs directory
diff mbox series

Message ID 20191128150130.26266-1-andrzej.p@collabora.com
State New
Headers show
Series
  • drm/i915: Provide ddc symlink in hdmi connector sysfs directory
Related show

Commit Message

Andrzej Pietrasiewicz Nov. 28, 2019, 3:01 p.m. UTC
Use the ddc pointer provided by the generic connector.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
---
Rebased onto drm-intel-next-queued.

 drivers/gpu/drm/i915/display/intel_hdmi.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Andrzej Pietrasiewicz Dec. 13, 2019, 4:10 p.m. UTC | #1
W dniu 28.11.2019 o 16:01, Andrzej Pietrasiewicz pisze:
> Use the ddc pointer provided by the generic connector.
> 

A gentle ping.

Andrzej

> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> ---
> Rebased onto drm-intel-next-queued.
> 
>   drivers/gpu/drm/i915/display/intel_hdmi.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 29a174af5314..6ec8d14bccd7 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -3134,6 +3134,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>   	struct intel_encoder *intel_encoder = &intel_dig_port->base;
>   	struct drm_device *dev = intel_encoder->base.dev;
>   	struct drm_i915_private *dev_priv = to_i915(dev);
> +	struct i2c_adapter *ddc;
>   	enum port port = intel_encoder->port;
>   	struct cec_connector_info conn_info;
>   
> @@ -3149,8 +3150,13 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>   		 intel_encoder->base.name))
>   		return;
>   
> -	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> -			   DRM_MODE_CONNECTOR_HDMIA);
> +	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> +	ddc = intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
> +
> +	drm_connector_init_with_ddc(dev, connector,
> +				    &intel_hdmi_connector_funcs,
> +				    DRM_MODE_CONNECTOR_HDMIA,
> +				    ddc);
>   	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>   
>   	connector->interlace_allowed = 1;
> @@ -3160,8 +3166,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>   	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
>   		connector->ycbcr_420_allowed = true;
>   
> -	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> -
>   	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>   
>   	if (HAS_DDI(dev_priv))
>
Jani Nikula Dec. 19, 2019, 1:20 p.m. UTC | #2
On Fri, 13 Dec 2019, Andrzej Pietrasiewicz <andrzej.p@collabora.com> wrote:
> W dniu 28.11.2019 o 16:01, Andrzej Pietrasiewicz pisze:
>> Use the ddc pointer provided by the generic connector.
>> 
>
> A gentle ping.

Pushed, sorry for the delay.

BR,
Jani.

>
> Andrzej
>
>> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
>> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
>> ---
>> Rebased onto drm-intel-next-queued.
>> 
>>   drivers/gpu/drm/i915/display/intel_hdmi.c | 12 ++++++++----
>>   1 file changed, 8 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> index 29a174af5314..6ec8d14bccd7 100644
>> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> @@ -3134,6 +3134,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>>   	struct intel_encoder *intel_encoder = &intel_dig_port->base;
>>   	struct drm_device *dev = intel_encoder->base.dev;
>>   	struct drm_i915_private *dev_priv = to_i915(dev);
>> +	struct i2c_adapter *ddc;
>>   	enum port port = intel_encoder->port;
>>   	struct cec_connector_info conn_info;
>>   
>> @@ -3149,8 +3150,13 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>>   		 intel_encoder->base.name))
>>   		return;
>>   
>> -	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
>> -			   DRM_MODE_CONNECTOR_HDMIA);
>> +	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
>> +	ddc = intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
>> +
>> +	drm_connector_init_with_ddc(dev, connector,
>> +				    &intel_hdmi_connector_funcs,
>> +				    DRM_MODE_CONNECTOR_HDMIA,
>> +				    ddc);
>>   	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>>   
>>   	connector->interlace_allowed = 1;
>> @@ -3160,8 +3166,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>>   	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
>>   		connector->ycbcr_420_allowed = true;
>>   
>> -	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
>> -
>>   	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>>   
>>   	if (HAS_DDI(dev_priv))
>> 
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 29a174af5314..6ec8d14bccd7 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -3134,6 +3134,7 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 	struct intel_encoder *intel_encoder = &intel_dig_port->base;
 	struct drm_device *dev = intel_encoder->base.dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct i2c_adapter *ddc;
 	enum port port = intel_encoder->port;
 	struct cec_connector_info conn_info;
 
@@ -3149,8 +3150,13 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 		 intel_encoder->base.name))
 		return;
 
-	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
-			   DRM_MODE_CONNECTOR_HDMIA);
+	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
+	ddc = intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
+
+	drm_connector_init_with_ddc(dev, connector,
+				    &intel_hdmi_connector_funcs,
+				    DRM_MODE_CONNECTOR_HDMIA,
+				    ddc);
 	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
 
 	connector->interlace_allowed = 1;
@@ -3160,8 +3166,6 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
 		connector->ycbcr_420_allowed = true;
 
-	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
-
 	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
 
 	if (HAS_DDI(dev_priv))