[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-19 Thread Wolfram Sang
On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote: > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes virtuousgeek.org> wrote: > > On Thu, 16 Jun 2011 15:28:46 +0200 > > Wolfram Sang wrote: > > > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or > > > a warning in

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-19 Thread Chris Wilson
On Sun, 19 Jun 2011 21:22:11 +0200, Wolfram Sang wrote: > On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote: > > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes > virtuousgeek.org> wrote: > > > On Thu, 16 Jun 2011 15:28:46 +0200 > > > Wolfram Sang wrote: > > > > How about BUG_ON(!pt

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-19 Thread Chris Wilson
On Sun, 19 Jun 2011 21:22:11 +0200, Wolfram Sang wrote: > On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote: > > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes > > wrote: > > > On Thu, 16 Jun 2011 15:28:46 +0200 > > > Wolfram Sang wrote: > > > > How about BUG_ON(!ptr) in the init-r

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-19 Thread Wolfram Sang
On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote: > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes > wrote: > > On Thu, 16 Jun 2011 15:28:46 +0200 > > Wolfram Sang wrote: > > > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or > > > a warning in the else-block

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Chris Wilson
On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes wrote: > On Thu, 16 Jun 2011 15:28:46 +0200 > Wolfram Sang wrote: > > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or > > a warning in the else-block? It seems to happen to users... > > Yeah, a BUG_ON would be fine. if (W

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Wolfram Sang
> > Commit 6067aa (drm/i915: split clock gating init into per-chipset > > functions) unconditionally calls the newly created > > init_clock_gating-pointer. There is one case, however, where it does > > not get set: > > > > if (HAS_PCH_SPLIT(dev)) { > > ... > > } else > > dev_pr

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Chris Wilson
On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes wrote: > On Thu, 16 Jun 2011 15:28:46 +0200 > Wolfram Sang wrote: > > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or > > a warning in the else-block? It seems to happen to users... > > Yeah, a BUG_ON would be fine. if (W

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Jesse Barnes
On Thu, 16 Jun 2011 15:28:46 +0200 Wolfram Sang wrote: > > > Commit 6067aa (drm/i915: split clock gating init into per-chipset > > > functions) unconditionally calls the newly created > > > init_clock_gating-pointer. There is one case, however, where it does > > > not get set: > > > > > > if (HA

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Jesse Barnes
On Thu, 16 Jun 2011 15:28:46 +0200 Wolfram Sang wrote: > > > Commit 6067aa (drm/i915: split clock gating init into per-chipset > > > functions) unconditionally calls the newly created > > > init_clock_gating-pointer. There is one case, however, where it does > > > not get set: > > > > > > if (HA

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Wolfram Sang
> > Commit 6067aa (drm/i915: split clock gating init into per-chipset > > functions) unconditionally calls the newly created > > init_clock_gating-pointer. There is one case, however, where it does > > not get set: > > > > if (HAS_PCH_SPLIT(dev)) { > > ... > > } else > > dev_pr

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-16 Thread Wolfram Sang
Commit 6067aa (drm/i915: split clock gating init into per-chipset functions) unconditionally calls the newly created init_clock_gating-pointer. There is one case, however, where it does not get set: if (HAS_PCH_SPLIT(dev)) { ... } else dev_priv->display.update_wm =

Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-15 Thread Jesse Barnes
On Thu, 16 Jun 2011 00:24:39 +0200 Wolfram Sang wrote: > Commit 6067aa (drm/i915: split clock gating init into per-chipset > functions) unconditionally calls the newly created > init_clock_gating-pointer. There is one case, however, where it does > not get set: > > if (HAS_PCH_SPLIT(dev)) { >

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-15 Thread Wolfram Sang
Commit 6067aa (drm/i915: split clock gating init into per-chipset functions) unconditionally calls the newly created init_clock_gating-pointer. There is one case, however, where it does not get set: if (HAS_PCH_SPLIT(dev)) { ... } else dev_priv->display.update_wm =

[PATCH] drm/i915: add check for valid init_clock_gating-pointer

2011-06-15 Thread Jesse Barnes
On Thu, 16 Jun 2011 00:24:39 +0200 Wolfram Sang wrote: > Commit 6067aa (drm/i915: split clock gating init into per-chipset > functions) unconditionally calls the newly created > init_clock_gating-pointer. There is one case, however, where it does > not get set: > > if (HAS_PCH_SPLIT(dev)) { >