[PATCH 10/10] drm/exynos: added virtual display driver.

Inki Dae inki.dae at samsung.com
Thu Mar 15 05:01:30 PDT 2012



> -----Original Message-----
> From: David Airlie [mailto:airlied at redhat.com]
> Sent: Thursday, March 15, 2012 8:44 PM
> To: Inki Dae
> Cc: kyungmin park; sw0312 kim; dri-devel at lists.freedesktop.org; Dave
> Airlie
> Subject: Re: [PATCH 10/10] drm/exynos: added virtual display driver.
> 
> 
> 
> ----- Original Message -----
> > From: "Inki Dae" <inki.dae at samsung.com>
> > To: "Dave Airlie" <airlied at gmail.com>
> > Cc: "kyungmin park" <kyungmin.park at samsung.com>, "sw0312 kim"
> <sw0312.kim at samsung.com>,
> > dri-devel at lists.freedesktop.org
> > Sent: Thursday, 15 March, 2012 11:36:14 AM
> > Subject: RE: [PATCH 10/10] drm/exynos: added virtual display driver.
> >
> >
> >
> > > -----Original Message-----
> > > From: Dave Airlie [mailto:airlied at gmail.com]
> > > Sent: Thursday, March 15, 2012 7:44 PM
> > > To: Inki Dae
> > > Cc: dri-devel at lists.freedesktop.org; kyungmin.park at samsung.com;
> > > sw0312.kim at samsung.com
> > > Subject: Re: [PATCH 10/10] drm/exynos: added virtual display
> > > driver.
> > >
> > > > diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h
> > > > index 907daaf..1123342 100644
> > > > --- a/include/drm/exynos_drm.h
> > > > +++ b/include/drm/exynos_drm.h
> > > > @@ -76,6 +76,22 @@ struct drm_exynos_gem_mmap {
> > > >        uint64_t mapped;
> > > >  };
> > > >
> > > > +/**
> > > > + * A structure for user connection request of virtual display.
> > > > + *
> > > > + * @connection: indicate whether doing connetion or not by user.
> > > > + * @extensions: if this value is 1 then the vidi driver would
> > > > need
> > > additional
> > > > + *     128bytes edid data.
> > > > + * @pad: just padding to be 64-bit aligned.
> > > > + * @edid: the edid data pointer from user side.
> > > > + */
> > > > +struct drm_exynos_vidi_connection {
> > > > +       unsigned int connection;
> > > > +       unsigned int extensions;
> > > > +       unsigned int pad;
> > > > +       void *edid;
> > > > +};
> > > > +
> > >
> > > No void * in ioctl structs use u64, also not sure why you have a
> > > 32-bit pad since you probably want it padded to 64-bit.
> > >
> > > Dave.
> >
> > Yes, right. I wanted it to be padded to 64-bit. and edid would point
> > to
> > buffer containing edit data and it would be passed from user to
> > kernel side
> > so for this, is it right to use u64? I will change variable type to
> > "void
> > __user *" if your missing point. please let me know if there is any
> > problem.
> >
> 
> You need to use __u64 instead of a void, since void * isn't a fixed length
> across 32/64-bit.
> 
> You'll notice this done a few places in the drm kms interfaces.
> 
> Dave.

Ok, got it. thanks for your comment.

Inki Dae



More information about the dri-devel mailing list