All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: prevent crash with .disable_display parameter
@ 2017-01-18  0:37 clinton.a.taylor
  2017-01-18  1:24 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: clinton.a.taylor @ 2017-01-18  0:37 UTC (permalink / raw)
  To: Intel-gfx

From: Clint Taylor <clinton.a.taylor@intel.com>

The .disable_display parameter was causing a fatal crash when fbdev was
dereferenced during driver init.

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 4e5ea58..b2a9195 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1140,7 +1140,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	 * irqs are fully enabled. We do it last so that the async config
 	 * cannot run before the connectors are registered.
 	 */
-	intel_fbdev_initial_config_async(dev);
+	if (dev_priv->fbdev) {
+		intel_fbdev_initial_config_async(dev);
+	}
 }
 
 /**
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: prevent crash with .disable_display parameter
  2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
@ 2017-01-18  1:24 ` Patchwork
  2017-01-18  9:52 ` [PATCH] " Chris Wilson
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-01-18  1:24 UTC (permalink / raw)
  To: clinton.a.taylor; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: prevent crash with .disable_display parameter
URL   : https://patchwork.freedesktop.org/series/18151/
State : success

== Summary ==

Series 18151v1 drm/i915: prevent crash with .disable_display parameter
https://patchwork.freedesktop.org/api/1.0/series/18151/revisions/1/mbox/


fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

d4ca2d2b591f1ca6b50eaf3253412f4c11ec1be2 drm-tip: 2017y-01m-17d-22h-19m-37s UTC integration manifest
400c68c drm/i915: prevent crash with .disable_display parameter

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3535/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent crash with .disable_display parameter
  2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
  2017-01-18  1:24 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-01-18  9:52 ` Chris Wilson
  2017-01-18 10:16   ` Chris Wilson
  2017-01-18 16:22   ` Clint Taylor
  2017-01-18 15:54 ` kbuild test robot
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 9+ messages in thread
From: Chris Wilson @ 2017-01-18  9:52 UTC (permalink / raw)
  To: clinton.a.taylor; +Cc: Intel-gfx

On Tue, Jan 17, 2017 at 04:37:28PM -0800, clinton.a.taylor@intel.com wrote:
> From: Clint Taylor <clinton.a.taylor@intel.com>
> 
> The .disable_display parameter was causing a fatal crash when fbdev was
> dereferenced during driver init.

The other guards are within intel_fbdev.c, it would be consistent to put
this as the start of intel_fbdev_initial_config_async().

Testcase: igt/drv_module_reload/basic-no-display
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent crash with .disable_display parameter
  2017-01-18  9:52 ` [PATCH] " Chris Wilson
@ 2017-01-18 10:16   ` Chris Wilson
  2017-01-18 16:22   ` Clint Taylor
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-01-18 10:16 UTC (permalink / raw)
  To: clinton.a.taylor, Intel-gfx

On Wed, Jan 18, 2017 at 09:52:35AM +0000, Chris Wilson wrote:
> On Tue, Jan 17, 2017 at 04:37:28PM -0800, clinton.a.taylor@intel.com wrote:
> > From: Clint Taylor <clinton.a.taylor@intel.com>
> > 
> > The .disable_display parameter was causing a fatal crash when fbdev was
> > dereferenced during driver init.
> 
> The other guards are within intel_fbdev.c, it would be consistent to put
> this as the start of intel_fbdev_initial_config_async().
> 
> Testcase: igt/drv_module_reload/basic-no-display

Also

Fixes: 43cee314345a ("drm/i915/fbdev: Limit the global async-domain synchronization")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.8+

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent crash with .disable_display parameter
  2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
  2017-01-18  1:24 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-01-18  9:52 ` [PATCH] " Chris Wilson
@ 2017-01-18 15:54 ` kbuild test robot
  2017-01-18 21:38 ` [PATCH v2] " clinton.a.taylor
  2017-01-18 22:24 ` ✗ Fi.CI.BAT: failure for drm/i915: prevent crash with .disable_display parameter (rev2) Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2017-01-18 15:54 UTC (permalink / raw)
  To: clinton.a.taylor; +Cc: Intel-gfx, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]

Hi Clint,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.10-rc4 next-20170118]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/clinton-a-taylor-intel-com/drm-i915-prevent-crash-with-disable_display-parameter/20170118-230141
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x005-201703 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/ioport.h:12:0,
                    from include/linux/acpi.h:25,
                    from drivers/gpu/drm/i915/i915_drv.c:30:
   drivers/gpu/drm/i915/i915_drv.c: In function 'i915_driver_register':
>> drivers/gpu/drm/i915/i915_drv.c:1143:14: error: 'struct drm_i915_private' has no member named 'fbdev'
     if (dev_priv->fbdev) {
                 ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/i915_drv.c:1143:2: note: in expansion of macro 'if'
     if (dev_priv->fbdev) {
     ^~
>> drivers/gpu/drm/i915/i915_drv.c:1143:14: error: 'struct drm_i915_private' has no member named 'fbdev'
     if (dev_priv->fbdev) {
                 ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/gpu/drm/i915/i915_drv.c:1143:2: note: in expansion of macro 'if'
     if (dev_priv->fbdev) {
     ^~
>> drivers/gpu/drm/i915/i915_drv.c:1143:14: error: 'struct drm_i915_private' has no member named 'fbdev'
     if (dev_priv->fbdev) {
                 ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/gpu/drm/i915/i915_drv.c:1143:2: note: in expansion of macro 'if'
     if (dev_priv->fbdev) {
     ^~

vim +1143 drivers/gpu/drm/i915/i915_drv.c

  1137		 * Some ports require correctly set-up hpd registers for detection to
  1138		 * work properly (leading to ghost connected connector status), e.g. VGA
  1139		 * on gm45.  Hence we can only set up the initial fbdev config after hpd
  1140		 * irqs are fully enabled. We do it last so that the async config
  1141		 * cannot run before the connectors are registered.
  1142		 */
> 1143		if (dev_priv->fbdev) {
  1144			intel_fbdev_initial_config_async(dev);
  1145		}
  1146	}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29818 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: prevent crash with .disable_display parameter
  2017-01-18  9:52 ` [PATCH] " Chris Wilson
  2017-01-18 10:16   ` Chris Wilson
@ 2017-01-18 16:22   ` Clint Taylor
  1 sibling, 0 replies; 9+ messages in thread
From: Clint Taylor @ 2017-01-18 16:22 UTC (permalink / raw)
  To: Chris Wilson, Intel-gfx

On 01/18/2017 01:52 AM, Chris Wilson wrote:
> On Tue, Jan 17, 2017 at 04:37:28PM -0800, clinton.a.taylor@intel.com wrote:
>> From: Clint Taylor <clinton.a.taylor@intel.com>
>>
>> The .disable_display parameter was causing a fatal crash when fbdev was
>> dereferenced during driver init.
>
> The other guards are within intel_fbdev.c, it would be consistent to put
> this as the start of intel_fbdev_initial_config_async().

I came to that conclusion last night as well.

>
> Testcase: igt/drv_module_reload/basic-no-display
> -Chris
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] drm/i915: prevent crash with .disable_display parameter
  2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
                   ` (2 preceding siblings ...)
  2017-01-18 15:54 ` kbuild test robot
@ 2017-01-18 21:38 ` clinton.a.taylor
  2017-01-19  8:55   ` Chris Wilson
  2017-01-18 22:24 ` ✗ Fi.CI.BAT: failure for drm/i915: prevent crash with .disable_display parameter (rev2) Patchwork
  4 siblings, 1 reply; 9+ messages in thread
From: clinton.a.taylor @ 2017-01-18 21:38 UTC (permalink / raw)
  To: Intel-gfx

From: Clint Taylor <clinton.a.taylor@intel.com>

The .disable_display parameter was causing a fatal crash when fbdev
was dereferenced during driver init.

V1: protection in i915_drv.c
V2: Moved protection to intel_fbdev.c

Cc: Chris Wilson <chris@chris-wilson.co.uk>

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
---
 drivers/gpu/drm/i915/intel_fbdev.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index bdefa61..bb0e9bf 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -742,6 +742,9 @@ void intel_fbdev_initial_config_async(struct drm_device *dev)
 {
 	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
 
+	if (!ifbdev)
+		return;
+
 	ifbdev->cookie = async_schedule(intel_fbdev_initial_config, ifbdev);
 }
 
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915: prevent crash with .disable_display parameter (rev2)
  2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
                   ` (3 preceding siblings ...)
  2017-01-18 21:38 ` [PATCH v2] " clinton.a.taylor
@ 2017-01-18 22:24 ` Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-01-18 22:24 UTC (permalink / raw)
  To: clinton.a.taylor; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: prevent crash with .disable_display parameter (rev2)
URL   : https://patchwork.freedesktop.org/series/18151/
State : failure

== Summary ==

Series 18151v2 drm/i915: prevent crash with .disable_display parameter
https://patchwork.freedesktop.org/api/1.0/series/18151/revisions/2/mbox/

Test gem_busy:
        Subgroup basic-hang-default:
                pass       -> FAIL       (fi-hsw-4770r)
Test gvt_basic:
        Subgroup invalid-placeholder-test:
                incomplete -> SKIP       (fi-ivb-3770)

fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:226  dwarn:0   dfail:0   fail:1   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

982f60faead5a1de551c73caae72add8cafc3355 drm-tip: 2017y-01m-18d-15h-09m-06s UTC integration manifest
7716956 drm/i915: prevent crash with .disable_display parameter

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3541/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] drm/i915: prevent crash with .disable_display parameter
  2017-01-18 21:38 ` [PATCH v2] " clinton.a.taylor
@ 2017-01-19  8:55   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-01-19  8:55 UTC (permalink / raw)
  To: clinton.a.taylor; +Cc: Intel-gfx

On Wed, Jan 18, 2017 at 01:38:43PM -0800, clinton.a.taylor@intel.com wrote:
> From: Clint Taylor <clinton.a.taylor@intel.com>
> 
> The .disable_display parameter was causing a fatal crash when fbdev
> was dereferenced during driver init.
> 
> V1: protection in i915_drv.c
> V2: Moved protection to intel_fbdev.c
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>

Added the fixes tags and pushed. Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-01-19  8:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18  0:37 [PATCH] drm/i915: prevent crash with .disable_display parameter clinton.a.taylor
2017-01-18  1:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-18  9:52 ` [PATCH] " Chris Wilson
2017-01-18 10:16   ` Chris Wilson
2017-01-18 16:22   ` Clint Taylor
2017-01-18 15:54 ` kbuild test robot
2017-01-18 21:38 ` [PATCH v2] " clinton.a.taylor
2017-01-19  8:55   ` Chris Wilson
2017-01-18 22:24 ` ✗ Fi.CI.BAT: failure for drm/i915: prevent crash with .disable_display parameter (rev2) Patchwork

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.