2010-12-30 02:49:42

by Jeff Chua

[permalink] [raw]
Subject: Re: Linux 2.6.37-rc8 (no fb)


On Thu, Dec 30, 2010 at 4:16 AM, Jesse Barnes <[email protected]>
wrote:

> Randy, Jeff and Alex, does the below help at all? If so, it may be the
> minimal fix we want for 2.6.37.

Jesse,

Yes, that worked for me. I improved on the patch a bit below.

Thanks,
Jeff


--- a/drivers/gpu/drm/i915/intel_bios.c 2010-12-29 13:35:57.000000000 +0800
+++ a/drivers/gpu/drm/i915/intel_bios.c 2010-12-30 10:18:39.000000000 +0800
@@ -262,7 +262,10 @@
if (general) {
dev_priv->int_tv_support = general->int_tv_support;
dev_priv->int_crt_support = general->int_crt_support;
- dev_priv->lvds_use_ssc = general->enable_ssc;
+
+ /* force disable until we can parse this correctly */
+ dev_priv->lvds_use_ssc = (IS_GEN5(dev) || IS_GEN6(dev)) ?
+ 0 : general->enable_ssc;

if (dev_priv->lvds_use_ssc) {
if (IS_I85X(dev))


2010-12-30 18:17:01

by Jesse Barnes

[permalink] [raw]
Subject: Re: Linux 2.6.37-rc8 (no fb)

On Thu, 30 Dec 2010 10:49:33 +0800 (SGT)
Jeff Chua <[email protected]> wrote:

>
> On Thu, Dec 30, 2010 at 4:16 AM, Jesse Barnes <[email protected]>
> wrote:
>
> > Randy, Jeff and Alex, does the below help at all? If so, it may be the
> > minimal fix we want for 2.6.37.
>
> Jesse,
>
> Yes, that worked for me. I improved on the patch a bit below.
>
> Thanks,
> Jeff
>
>
> --- a/drivers/gpu/drm/i915/intel_bios.c 2010-12-29 13:35:57.000000000 +0800
> +++ a/drivers/gpu/drm/i915/intel_bios.c 2010-12-30 10:18:39.000000000 +0800
> @@ -262,7 +262,10 @@
> if (general) {
> dev_priv->int_tv_support = general->int_tv_support;
> dev_priv->int_crt_support = general->int_crt_support;
> - dev_priv->lvds_use_ssc = general->enable_ssc;
> +
> + /* force disable until we can parse this correctly */
> + dev_priv->lvds_use_ssc = (IS_GEN5(dev) || IS_GEN6(dev)) ?
> + 0 : general->enable_ssc;

For some expressions, the ternary operator is more compact & readable.
For others (like this one imo) it doesn't really add anything, so I
prefer the if statement. In this case I think the if statement is more
readable since it communicates that we're overriding the default value
on certain generations (i.e. it's a standalone clause).

--
Jesse Barnes, Intel Open Source Technology Center

2010-12-30 23:31:32

by Chris Wilson

[permalink] [raw]
Subject: Re: Linux 2.6.37-rc8 (no fb)

On Thu, 30 Dec 2010 10:49:33 +0800 (SGT), Jeff Chua <[email protected]> wrote:
>
> On Thu, Dec 30, 2010 at 4:16 AM, Jesse Barnes <[email protected]>
> wrote:
>
> > Randy, Jeff and Alex, does the below help at all? If so, it may be the
> > minimal fix we want for 2.6.37.
>
> Jesse,
>
> Yes, that worked for me. I improved on the patch a bit below.
>
> Thanks,
> Jeff
>
>
> --- a/drivers/gpu/drm/i915/intel_bios.c 2010-12-29 13:35:57.000000000 +0800
> +++ a/drivers/gpu/drm/i915/intel_bios.c 2010-12-30 10:18:39.000000000 +0800
> @@ -262,7 +262,10 @@
> if (general) {
> dev_priv->int_tv_support = general->int_tv_support;
> dev_priv->int_crt_support = general->int_crt_support;
> - dev_priv->lvds_use_ssc = general->enable_ssc;
> +
> + /* force disable until we can parse this correctly */
> + dev_priv->lvds_use_ssc = (IS_GEN5(dev) || IS_GEN6(dev)) ?
> + 0 : general->enable_ssc;

This reveals another bug whereby we don't clear conflicting bits in
PCH_DREF_CONTROL set by the BIOS...
-Chris

--
Chris Wilson, Intel Open Source Technology Centre