Re: [CI v3 2/6] drm/i915/hdmi: propagate errors from intel_hdmi_init_connector()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 Dec 2024, "Vodapalli, Ravi Kumar" <ravi.kumar.vodapalli@xxxxxxxxx> wrote:
> On 12/30/2024 7:44 PM, Jani Nikula wrote:
>> Propagate errors from intel_hdmi_init_connector() to be able to handle
>> them at callers. This is similar to intel_dp_init_connector().
>>
>> Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
>> Cc: Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx>
>> Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
>> Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@xxxxxxxxxxxx
>> Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
>> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
>> ---
>>   drivers/gpu/drm/i915/display/intel_hdmi.c | 10 ++++++----
>>   drivers/gpu/drm/i915/display/intel_hdmi.h |  2 +-
>>   2 files changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> index f7b1768b279c..ed29dd0ccef0 100644
>> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> @@ -3039,7 +3039,7 @@ void intel_infoframe_init(struct intel_digital_port *dig_port)
>>   	}
>>   }
>>   
>> -void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>> +bool intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>>   			       struct intel_connector *intel_connector)
>>   {
>>   	struct intel_display *display = to_intel_display(dig_port);
>> @@ -3056,17 +3056,17 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>>   		    intel_encoder->base.base.id, intel_encoder->base.name);
>>   
>>   	if (DISPLAY_VER(display) < 12 && drm_WARN_ON(dev, port == PORT_A))
>> -		return;
>> +		return false;
>>   
>>   	if (drm_WARN(dev, dig_port->max_lanes < 4,
>>   		     "Not enough lanes (%d) for HDMI on [ENCODER:%d:%s]\n",
>>   		     dig_port->max_lanes, intel_encoder->base.base.id,
>>   		     intel_encoder->base.name))
>> -		return;
>> +		return false;
>>   
>>   	ddc_pin = intel_hdmi_ddc_pin(intel_encoder);
>>   	if (!ddc_pin)
>> -		return;
>> +		return false;
>>   
>>   	drm_connector_init_with_ddc(dev, connector,
>>   				    &intel_hdmi_connector_funcs,
>
> drm_connector_init_with_ddc() function has return values, these should 
> also be handled here.

It's going to need to be a separate patch.

BR,
Jani.

>
>> @@ -3111,6 +3111,8 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>>   					   &conn_info);
>>   	if (!intel_hdmi->cec_notifier)
>>   		drm_dbg_kms(display->drm, "CEC notifier get failed\n");
>> +
>> +	return true;
>>   }
>>   
>>   /*
>> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h
>> index 466f48df8a74..38deaeb302a2 100644
>> --- a/drivers/gpu/drm/i915/display/intel_hdmi.h
>> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.h
>> @@ -22,7 +22,7 @@ struct intel_encoder;
>>   struct intel_hdmi;
>>   union hdmi_infoframe;
>>   
>> -void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>> +bool intel_hdmi_init_connector(struct intel_digital_port *dig_port,
>>   			       struct intel_connector *intel_connector);
>>   bool intel_hdmi_compute_has_hdmi_sink(struct intel_encoder *encoder,
>>   				      const struct intel_crtc_state *crtc_state,
>

-- 
Jani Nikula, Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux