RE: [PATCH v3 4/6] drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector()

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

 




> -----Original Message-----
> From: Nikula, Jani <jani.nikula@xxxxxxxxx>
> Sent: Friday, December 13, 2024 7:46 PM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; intel-xe@xxxxxxxxxxxxxxxxxxxxx
> Cc: Nikula, Jani <jani.nikula@xxxxxxxxx>; Sergey Senozhatsky
> <senozhatsky@xxxxxxxxxxxx>; Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx>;
> Kandpal, Suraj <suraj.kandpal@xxxxxxxxx>
> Subject: [PATCH v3 4/6] drm/i915/ddi: gracefully handle errors from
> intel_ddi_init_hdmi_connector()
> 
> Errors from intel_ddi_init_hdmi_connector() can just mean "there's no HDMI"
> while we'll still want to continue with DP only. Handle the errors gracefully,
> but don't propagate. Clear the hdmi_reg which is used as a proxy to indicate
> the HDMI is initialized.
> 
> v2: Gracefully handle but do not propagate
> 
> 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> # v1
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c
> b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 21277cf8afef..2c4308506435 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4757,7 +4757,16 @@ static int intel_ddi_init_hdmi_connector(struct
> intel_digital_port *dig_port)
>  		return -ENOMEM;
> 
>  	dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
> -	intel_hdmi_init_connector(dig_port, connector);
> +
> +	if (!intel_hdmi_init_connector(dig_port, connector)) {
> +		/*
> +		 * HDMI connector init failures may just mean conflicting DDC
> +		 * pins or not having enough lanes. Handle them gracefully,
> but
> +		 * don't fail the entire DDI init.
> +		 */
> +		dig_port->hdmi.hdmi_reg = INVALID_MMIO_REG;
> +		kfree(connector);
> +	}
> 
>  	return 0;
>  }
> --
> 2.39.5





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

  Powered by Linux