From: Anssi Hannula <anssi.hannula-X3B1VOXEql0@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH r2] drm/nv04: fix null pointer dereferences of native_mode
Date: Mon, 24 Aug 2009 02:37:02 +0300 [thread overview]
Message-ID: <4A91D29E.7040605@iki.fi> (raw)
In-Reply-To: <4A886130.5020005-X3B1VOXEql0@public.gmane.org>
Anssi Hannula wrote:
> nv_connector->native_mode is not set when no modes were found for the
> connector, so its existence can't be assumed.
>
> In nv04_dfp_mode_fixup, reject the mode if GPU scaling is enabled but
> native mode is not known.
>
> In nv04_dfp_mode_set, use clock value from output_mode (nv_encoder->mode)
> instead of nv_connector->native_mode. If panel scaling is enabled on a
> TMDS display and the display did not have a valid EDID, native_mode is
> NULL.
>
> In nv04_lvds_dpms and nv04_dfp_restore, refuse to turn on an LVDS panel
> if native mode is not known. While clock is not always required for
> turning panel on, having an LVDS without native mode means something went
> wrong already, so trying to turn panel on only in cases where clock is
> required would yield no added benefit.
>
> Signed-off-by: Anssi Hannula <anssi.hannula-X3B1VOXEql0@public.gmane.org>
>
> ---
>
> Rev2: Use output_mode (&nv_encoder->mode) in nv04_dfp_mode_set; that shortcut
> was just added by Francisco Jerez so it didn't make it into my initial patch
>
> Please review especially the changes in nv04_dfp_mode_fixup. Previously
> (2 << 24) | (8 << 28) was set in regp->fp_control with dual link TMDS
> panel, even if we were using a single link mode with panel scaling. As I
> didn't know what it is for, I assumed it was a mistake and made it depend
> on the actual output mode (i.e. native_mode with GPU scaling only) instead.
> Someone who knows this stuff should confirm this or fix it in another
> way :)
>
> This fixes up http://bugs.freedesktop.org/show_bug.cgi?id=23295
Ping?
--
Anssi Hannula
prev parent reply other threads:[~2009-08-23 23:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 17:24 [PATCH] drm/nv04: fix null pointer dereferences of native_mode Anssi Hannula
[not found] ` <4A8840D7.5000409-X3B1VOXEql0@public.gmane.org>
2009-08-16 19:42 ` [PATCH r2] " Anssi Hannula
[not found] ` <4A886130.5020005-X3B1VOXEql0@public.gmane.org>
2009-08-17 4:11 ` Anssi Hannula
2009-08-23 23:37 ` Anssi Hannula [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=4A91D29E.7040605@iki.fi \
--to=anssi.hannula-x3b1voxeql0@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.