Linux 4.1 WARNING in drm_ioctl.c
diff mbox

Message ID 20150623094847.GR25769@phenom.ffwll.local
State New
Headers show

Commit Message

Daniel Vetter June 23, 2015, 9:48 a.m. UTC
On Tue, Jun 23, 2015 at 08:27:13AM +0100, Daniel Stone wrote:
> Hi,
> 
> On 23 June 2015 at 07:39, Daniel Vetter <daniel@ffwll.ch> wrote:
> > Which drm driver are you using? I didn't spot anything in your module list
> > but might have missed it. Booting with drm.debug=0xe and grabbing dmesg
> > will tell us for sure.
> 
> That'd be vgem.

If so then the below diff should help.
-Daniel

Comments

Fabio Coatti June 23, 2015, 10:46 a.m. UTC | #1
In data martedì 23 giugno 2015 11:48:47, Daniel Vetter ha scritto:
> On Tue, Jun 23, 2015 at 08:27:13AM +0100, Daniel Stone wrote:
> > Hi,
> > 
> > On 23 June 2015 at 07:39, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > Which drm driver are you using? I didn't spot anything in your module
> > > list
> > > but might have missed it. Booting with drm.debug=0xe and grabbing dmesg
> > > will tell us for sure.
> > 
> > That'd be vgem.
> 
> If so then the below diff should help.
> -Daniel
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c
> b/drivers/gpu/drm/vgem/vgem_drv.c index 7a207ca547be..b491fb32cddb 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -328,6 +328,8 @@ static int __init vgem_init(void)
>  		goto out;
>  	}
> 
> +	drm_dev_set_unique(drm, "vgem");
> +
>  	ret  = drm_dev_register(vgem_device, 0);
> 
>  	if (ret)


Not really sure about "drm" in drm_dev_set_unique():

  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  CC      drivers/gpu/drm/vgem/vgem_drv.o
drivers/gpu/drm/vgem/vgem_drv.c: In function ‘vgem_init’:
drivers/gpu/drm/vgem/vgem_drv.c:331:21: error: ‘drm’ undeclared (first use in 
this function)
Daniel Vetter June 23, 2015, 1:29 p.m. UTC | #2
On Tue, Jun 23, 2015 at 12:46:09PM +0200, Fabio Coatti wrote:
> In data martedì 23 giugno 2015 11:48:47, Daniel Vetter ha scritto:
> > On Tue, Jun 23, 2015 at 08:27:13AM +0100, Daniel Stone wrote:
> > > Hi,
> > > 
> > > On 23 June 2015 at 07:39, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > > Which drm driver are you using? I didn't spot anything in your module
> > > > list
> > > > but might have missed it. Booting with drm.debug=0xe and grabbing dmesg
> > > > will tell us for sure.
> > > 
> > > That'd be vgem.
> > 
> > If so then the below diff should help.
> > -Daniel
> > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c
> > b/drivers/gpu/drm/vgem/vgem_drv.c index 7a207ca547be..b491fb32cddb 100644
> > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > @@ -328,6 +328,8 @@ static int __init vgem_init(void)
> >  		goto out;
> >  	}
> > 
> > +	drm_dev_set_unique(drm, "vgem");
> > +
> >  	ret  = drm_dev_register(vgem_device, 0);
> > 
> >  	if (ret)
> 
> 
> Not really sure about "drm" in drm_dev_set_unique():
> 
>   CHK     include/generated/compile.h
>   GZIP    kernel/config_data.gz
>   CHK     kernel/config_data.h
>   CC      drivers/gpu/drm/vgem/vgem_drv.o
> drivers/gpu/drm/vgem/vgem_drv.c: In function ‘vgem_init’:
> drivers/gpu/drm/vgem/vgem_drv.c:331:21: error: ‘drm’ undeclared (first use in 
> this function)

s/drm/vgem_device/ ... copypaste fail without running gcc.
-Daniel
Fabio Coatti June 23, 2015, 2:03 p.m. UTC | #3
In data martedì 23 giugno 2015 15:29:41, Daniel Vetter ha scritto:
> On Tue, Jun 23, 2015 at 12:46:09PM +0200, Fabio Coatti wrote:
> > In data martedì 23 giugno 2015 11:48:47, Daniel Vetter ha scritto:
> > > On Tue, Jun 23, 2015 at 08:27:13AM +0100, Daniel Stone wrote:
> > > > Hi,
> > > > 
> > > > On 23 June 2015 at 07:39, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > > > Which drm driver are you using? I didn't spot anything in your
> > > > > module
> > > > > list
> > > > > but might have missed it. Booting with drm.debug=0xe and grabbing
> > > > > dmesg
> > > > > will tell us for sure.
> > > > 
> > > > That'd be vgem.
> > > 
> > > If so then the below diff should help.
> > > -Daniel
> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c
> > > b/drivers/gpu/drm/vgem/vgem_drv.c index 7a207ca547be..b491fb32cddb
> > > 100644
> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > > @@ -328,6 +328,8 @@ static int __init vgem_init(void)
> > > 
> > >  		goto out;
> > >  	
> > >  	}
> > > 
> > > +	drm_dev_set_unique(drm, "vgem");
> > > +
> > > 
> > >  	ret  = drm_dev_register(vgem_device, 0);
> > >  	
> > >  	if (ret)
> > 
> > Not really sure about "drm" in drm_dev_set_unique():
> >   CHK     include/generated/compile.h
> >   GZIP    kernel/config_data.gz
> >   CHK     kernel/config_data.h
> >   CC      drivers/gpu/drm/vgem/vgem_drv.o
> > 
> > drivers/gpu/drm/vgem/vgem_drv.c: In function ‘vgem_init’:
> > drivers/gpu/drm/vgem/vgem_drv.c:331:21: error: ‘drm’ undeclared (first use
> > in this function)
> 
> s/drm/vgem_device/ ... copypaste fail without running gcc.
> -Daniel


Ok, that fixed, it; no more drm WARNING messages in dmesg. 

Many thanks!

Patch
diff mbox

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 7a207ca547be..b491fb32cddb 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -328,6 +328,8 @@  static int __init vgem_init(void)
 		goto out;
 	}
 
+	drm_dev_set_unique(drm, "vgem");
+
 	ret  = drm_dev_register(vgem_device, 0);
 
 	if (ret)