From: Lyude Paul <lyude@redhat.com>
To: Karol Herbst <kherbst@redhat.com>, linux-kernel@vger.kernel.org
Cc: Ben Skeggs <bskeggs@redhat.com>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
Olaf Skibbe <news@kravcenko.com>
Subject: Re: [PATCH] drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
Date: Mon, 07 Aug 2023 16:32:53 -0400 [thread overview]
Message-ID: <b350fd1e60cc0fa24a81be512e35f9b6a2358f94.camel@redhat.com> (raw)
In-Reply-To: <20230805101813.2603989-1-kherbst@redhat.com>
Ugh, thanks for catching this!
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Sat, 2023-08-05 at 12:18 +0200, Karol Herbst wrote:
> The original commit adding that check tried to protect the kenrel against
> a potential invalid NULL pointer access.
>
> However we call nouveau_connector_detect_depth once without a native_mode
> set on purpose for non LVDS connectors and this broke DP support in a few
> cases.
>
> Cc: Olaf Skibbe <news@kravcenko.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/238
> Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/245
> Fixes: 20a2ce87fbaf8 ("drm/nouveau/dp: check for NULL nv_connector->native_mode")
> Signed-off-by: Karol Herbst <kherbst@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index f75c6f09dd2af..a2e0033e8a260 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -967,7 +967,7 @@ nouveau_connector_get_modes(struct drm_connector *connector)
> /* Determine display colour depth for everything except LVDS now,
> * DP requires this before mode_valid() is called.
> */
> - if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode)
> + if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS)
> nouveau_connector_detect_depth(connector);
>
> /* Find the native mode if this is a digital panel, if we didn't
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
prev parent reply other threads:[~2023-08-07 20:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 10:18 Karol Herbst
2023-08-07 20:32 ` Lyude Paul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b350fd1e60cc0fa24a81be512e35f9b6a2358f94.camel@redhat.com \
--to=lyude@redhat.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=news@kravcenko.com \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®