Patchwork System76 - Intel DRM patch

login
register
mail settings
Submitter Carl Richell
Date April 1, 2012, 9:55 p.m.
Message ID <4F78CEB5.4020900@system76.com>
Download mbox | patch
Permalink /patch/149993/
State New
Headers show

Comments

Carl Richell - April 1, 2012, 9:55 p.m.
Hi,

We'd like to make sure 12.04 is flawless on our next-gen laptops. A 
kernel patch is required to fix an offset desktop bug. The patch applies 
cleanly on the current precise kernel. Please see:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/968307

https://bugzilla.kernel.org/show_bug.cgi?id=43012


-- Carl

References: https://bugs.freedesktop.org/show_bug.cgi?id=47271
Signed-off-by: Chris Wilson<chris@chris-wilson.co.uk>
Cc: stable@kernel.org
---
  drivers/gpu/drm/i915/i915_reg.h      |    1 +
  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
  2 files changed, 7 insertions(+), 0 deletions(-)
Robert Hooker - April 2, 2012, 2:34 a.m.
On Sun, Apr 1, 2012 at 5:55 PM, Carl Richell <carl@system76.com> wrote:
> Hi,
>
> We'd like to make sure 12.04 is flawless on our next-gen laptops. A kernel
> patch is required to fix an offset desktop bug. The patch applies cleanly on
> the current precise kernel. Please see:
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/968307
>
> https://bugzilla.kernel.org/show_bug.cgi?id=43012
>
>
> -- Carl
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=47271
> Signed-off-by: Chris Wilson<chris@chris-wilson.co.uk>
> Cc: stable@kernel.org
> ---
>  drivers/gpu/drm/i915/i915_reg.h      |    1 +
>  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> index 3d9ba01..218b3db9 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2385,6 +2385,7 @@
>  #define   PIPECONF_DISABLE     0
>  #define   PIPECONF_DOUBLE_WIDE (1<<30)
>  #define   I965_PIPECONF_ACTIVE (1<<30)
> +#define   PIPECONF_FRAME_START_DELAY_MASK (3<<27)
>  #define   PIPECONF_SINGLE_WIDE 0
>  #define   PIPECONF_PIPE_UNLOCKED 0
>  #define   PIPECONF_PIPE_LOCKED (1<<25)
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 6b0562b..73ea6e9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7695,6 +7695,12 @@ static void intel_sanitize_modesetting(struct
> drm_device *dev,
>        struct drm_i915_private *dev_priv = dev->dev_private;
>        u32 reg, val;
>
> +       /* Clear any frame start delays used for debugging left by the BIOS
> */
> +       for_each_pipe(pipe) {
> +               reg = PIPECONF(pipe);
> +               I915_WRITE(reg, I915_READ(reg)&
>  ~PIPECONF_FRAME_START_DELAY_MASK);
> +       }
> +
>        if (HAS_PCH_SPLIT(dev))
>                return;
>
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

This even hit some machines we at Canonical have in the past few days
and I was going to propose this as well. Note: It's specific to
machines with v2132 vbios versions, and will very likely be fixed in a
later vbios but it's pretty safe to say this vbios may ship in some
early panther point machines and causes screen corruption such as
http://ubuntuone.com/69BR1liJd25E6DRNqytGJF on boot so it would be
good to have in time to make the livecd's kernel. The original commit
message that will go upstream is here
http://lists.freedesktop.org/archives/intel-gfx/2012-March/015696.html
which also had

Reported-and-tested-by: Carl Richell <carl@system76.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012

added in http://lists.freedesktop.org/archives/intel-gfx/2012-March/016097.html

Acked-by: Robert Hooker <sarvatt@canonical.com>
Andy Whitcroft - April 2, 2012, 11:34 a.m.
On Sun, Apr 01, 2012 at 10:34:15PM -0400, Robert Hooker wrote:
> On Sun, Apr 1, 2012 at 5:55 PM, Carl Richell <carl@system76.com> wrote:
> > Hi,
> >
> > We'd like to make sure 12.04 is flawless on our next-gen laptops. A kernel
> > patch is required to fix an offset desktop bug. The patch applies cleanly on
> > the current precise kernel. Please see:
> >
> > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/968307
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=43012
> >
> >
> > -- Carl
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=47271
> > Signed-off-by: Chris Wilson<chris@chris-wilson.co.uk>
> > Cc: stable@kernel.org
> > ---
> >  drivers/gpu/drm/i915/i915_reg.h      |    1 +
> >  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
> >  2 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> > b/drivers/gpu/drm/i915/i915_reg.h
> > index 3d9ba01..218b3db9 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -2385,6 +2385,7 @@
> >  #define   PIPECONF_DISABLE     0
> >  #define   PIPECONF_DOUBLE_WIDE (1<<30)
> >  #define   I965_PIPECONF_ACTIVE (1<<30)
> > +#define   PIPECONF_FRAME_START_DELAY_MASK (3<<27)
> >  #define   PIPECONF_SINGLE_WIDE 0
> >  #define   PIPECONF_PIPE_UNLOCKED 0
> >  #define   PIPECONF_PIPE_LOCKED (1<<25)
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 6b0562b..73ea6e9 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -7695,6 +7695,12 @@ static void intel_sanitize_modesetting(struct
> > drm_device *dev,
> >        struct drm_i915_private *dev_priv = dev->dev_private;
> >        u32 reg, val;
> >
> > +       /* Clear any frame start delays used for debugging left by the BIOS
> > */
> > +       for_each_pipe(pipe) {
> > +               reg = PIPECONF(pipe);
> > +               I915_WRITE(reg, I915_READ(reg)&
> >  ~PIPECONF_FRAME_START_DELAY_MASK);
> > +       }
> > +
> >        if (HAS_PCH_SPLIT(dev))
> >                return;
> >
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team@lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
> 
> This even hit some machines we at Canonical have in the past few days
> and I was going to propose this as well. Note: It's specific to
> machines with v2132 vbios versions, and will very likely be fixed in a
> later vbios but it's pretty safe to say this vbios may ship in some
> early panther point machines and causes screen corruption such as
> http://ubuntuone.com/69BR1liJd25E6DRNqytGJF on boot so it would be
> good to have in time to make the livecd's kernel. The original commit
> message that will go upstream is here
> http://lists.freedesktop.org/archives/intel-gfx/2012-March/015696.html
> which also had
> 
> Reported-and-tested-by: Carl Richell <carl@system76.com>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012
> 
> added in http://lists.freedesktop.org/archives/intel-gfx/2012-March/016097.html
> 
> Acked-by: Robert Hooker <sarvatt@canonical.com>

Got a reference to where this got applied.  I find finding the current
owner of the various drm trees hard to determine, and frankly I am no
longer sure the MAINTAINERS entries are accurate since the kernel.org
issues.

-apw
Robert Hooker - April 2, 2012, 3:24 p.m.
"It's complicated" unfortunately, drm-intel-fixes is maintained by
keithp at http://cgit.freedesktop.org/~keithp/linux/ but he was
waiting until 3.4-rc1 to start the fixes branch. drm-intel-next is
maintained by danvet here
http://cgit.freedesktop.org/~danvet/drm-intel/. danvet has a temporary
drm-intel-fixes branch until keithp gets it set up with this commit
here http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-fixes&id=f47166d2b0001fcb752b40c5a2d4db986dfbea68.
airlied's core drm branches are on freedesktop as well unlike what
MAINTAINERS says - http://cgit.freedesktop.org/~airlied/linux/

Patch

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 3d9ba01..218b3db9 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2385,6 +2385,7 @@ 
  #define   PIPECONF_DISABLE	0
  #define   PIPECONF_DOUBLE_WIDE	(1<<30)
  #define   I965_PIPECONF_ACTIVE	(1<<30)
+#define   PIPECONF_FRAME_START_DELAY_MASK (3<<27)
  #define   PIPECONF_SINGLE_WIDE	0
  #define   PIPECONF_PIPE_UNLOCKED 0
  #define   PIPECONF_PIPE_LOCKED	(1<<25)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6b0562b..73ea6e9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7695,6 +7695,12 @@  static void intel_sanitize_modesetting(struct drm_device *dev,
  	struct drm_i915_private *dev_priv = dev->dev_private;
  	u32 reg, val;

+	/* Clear any frame start delays used for debugging left by the BIOS */
+	for_each_pipe(pipe) {
+		reg = PIPECONF(pipe);
+		I915_WRITE(reg, I915_READ(reg)&  ~PIPECONF_FRAME_START_DELAY_MASK);
+	}
+
  	if (HAS_PCH_SPLIT(dev))
  		return;