lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJMQK-iu6Z5kfEij1K8TdAxpCOoR3FL_gfRQMT2LS=e9o6C6qg@mail.gmail.com>
Date: Mon, 25 Mar 2024 17:07:22 -0700
From: Hsin-Yi Wang <hsinyi@...omium.org>
To: Douglas Anderson <dianders@...omium.org>
Cc: dri-devel@...ts.freedesktop.org, Pin-yen Lin <treapking@...omium.org>, 
	Prahlad Kilambi <prahladk@...gle.com>, Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...il.com>, 
	Jessica Zhang <quic_jesszhan@...cinc.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Sam Ravnborg <sam@...nborg.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] drm-panel: If drm_panel_dp_aux_backlight() fails,
 don't fail panel probe

On Mon, Mar 25, 2024 at 2:57 PM Douglas Anderson <dianders@...omiumorg> wrote:
>
> If we're using the AUX channel for eDP backlight and it fails to probe
> for some reason, let's _not_ fail the panel probe.
>
> At least one case where we could fail to init the backlight is because
> of a dead or physically missing panel. As talked about in detail in
> the earlier patch in this series, ("drm/panel-edp: If we fail to
> powerup/get EDID, use conservative timings"), this can cause the
> entire system's display pipeline to fail to come up and that's
> non-ideal.
>
> If we fail to init the backlight for some transitory reason, we should
> dig in and see if there's a way to fix this (perhaps retries?). Even
> in that case, though, having a panel whose backlight is stuck at 100%
> (the default, at least in the panel Samsung ATNA33XC20 I tested) is
> better than having no panel at all.
>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>

Reviewed-by: Hsin-Yi Wang <hsinyi@...omium.org>

> ---
> If needed, I could split this into two patches: one for each of the
> two panels that use drm_panel_dp_aux_backlight(). Since they both go
> through drm-misc, though, it doesn't feel worth it.
>
>  drivers/gpu/drm/panel/panel-edp.c                | 8 +++++++-
>  drivers/gpu/drm/panel/panel-samsung-atna33xc20.c | 9 +++++++--
>  2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
> index 607cdd6feda9..0bf66d9dd5b8 100644
> --- a/drivers/gpu/drm/panel/panel-edp.c
> +++ b/drivers/gpu/drm/panel/panel-edp.c
> @@ -944,8 +944,14 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
>                 err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
>                 pm_runtime_mark_last_busy(dev);
>                 pm_runtime_put_autosuspend(dev);
> +
> +               /*
> +                * Warn if we get an error, but don't consider it fatal. Having
> +                * a panel where we can't control the backlight is better than
> +                * no panel.
> +                */
>                 if (err)
> -                       goto err_finished_pm_runtime;
> +                       dev_warn(dev, "failed to register dp aux backlight: %d\n", err);
>         }
>
>         drm_panel_add(&panel->base);
> diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
> index 9c336c71562b..6828a4f24d14 100644
> --- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
> +++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
> @@ -328,9 +328,14 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep)
>         ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux);
>         pm_runtime_mark_last_busy(dev);
>         pm_runtime_put_autosuspend(dev);
> +
> +       /*
> +        * Warn if we get an error, but don't consider it fatal. Having
> +        * a panel where we can't control the backlight is better than
> +        * no panel.
> +        */
>         if (ret)
> -               return dev_err_probe(dev, ret,
> -                                    "failed to register dp aux backlight\n");
> +               dev_warn(dev, "failed to register dp aux backlight: %d\n", ret);
>
>         drm_panel_add(&panel->base);
>
> --
> 2.44.0.396.g6e790dbe36-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ