* [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
@ 2012-05-29 22:58 Laurent Pinchart
2012-05-30 11:29 ` Michel Dänzer
0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2012-05-29 22:58 UTC (permalink / raw)
To: dri-devel
DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
for KMS drivers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/gpu/drm/drm_irq.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
My understanding of the DRM framework tells me that calling
DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could also
mess up its internal state. Did I get it right ?
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index c798eea..03f16f3 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
* drm_vblank_pre_modeset - account for vblanks across mode sets
* @dev: DRM device
* @crtc: CRTC in question
- * @post: post or pre mode set?
*
* Account for vblank events across mode setting events, which will likely
* reset the hardware frame counter.
@@ -1037,6 +1036,10 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
if (!dev->num_crtcs)
return 0;
+ /* KMS drivers handle this internally */
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ return 0;
+
crtc = modeset->crtc;
if (crtc >= dev->num_crtcs)
return -EINVAL;
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
2012-05-29 22:58 [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers Laurent Pinchart
@ 2012-05-30 11:29 ` Michel Dänzer
2012-05-30 17:12 ` Laurent Pinchart
0 siblings, 1 reply; 5+ messages in thread
From: Michel Dänzer @ 2012-05-30 11:29 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: dri-devel
On Mit, 2012-05-30 at 00:58 +0200, Laurent Pinchart wrote:
> DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
> for KMS drivers.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_irq.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> My understanding of the DRM framework tells me that calling
> DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could also
> mess up its internal state. Did I get it right ?
Yes, good catch.
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index c798eea..03f16f3 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
> * drm_vblank_pre_modeset - account for vblanks across mode sets
> * @dev: DRM device
> * @crtc: CRTC in question
> - * @post: post or pre mode set?
> *
> * Account for vblank events across mode setting events, which will likely
> * reset the hardware frame counter.
This hunk should really be in a separate patch, but other than that
Reviewed-by: Michel Dänzer <michel@daenzer.net>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
2012-05-30 11:29 ` Michel Dänzer
@ 2012-05-30 17:12 ` Laurent Pinchart
2012-07-17 15:01 ` Laurent Pinchart
0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2012-05-30 17:12 UTC (permalink / raw)
To: Michel Dänzer; +Cc: dri-devel
Hi Michel,
On Wednesday 30 May 2012 13:29:06 Michel Dänzer wrote:
> On Mit, 2012-05-30 at 00:58 +0200, Laurent Pinchart wrote:
> > DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
> > for KMS drivers.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > drivers/gpu/drm/drm_irq.c | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > My understanding of the DRM framework tells me that calling
> > DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could also
> > mess up its internal state. Did I get it right ?
>
> Yes, good catch.
>
> > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> > index c798eea..03f16f3 100644
> > --- a/drivers/gpu/drm/drm_irq.c
> > +++ b/drivers/gpu/drm/drm_irq.c
> > @@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
> >
> > * drm_vblank_pre_modeset - account for vblanks across mode sets
> > * @dev: DRM device
> > * @crtc: CRTC in question
> > - * @post: post or pre mode set?
> > *
> > * Account for vblank events across mode setting events, which will
> > likely
> > * reset the hardware frame counter.
>
> This hunk should really be in a separate patch,
I've thought about sending a separate patch, but as the change only touched a
single line of comment related to the same function, I ended up not splitting
it. I can resubmit two patches if needed.
> but other than that
>
> Reviewed-by: Michel Dänzer <michel@daenzer.net>
Thank you.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
2012-05-30 17:12 ` Laurent Pinchart
@ 2012-07-17 15:01 ` Laurent Pinchart
2012-07-17 20:06 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2012-07-17 15:01 UTC (permalink / raw)
To: dri-devel; +Cc: Michel Dänzer
On Wednesday 30 May 2012 19:12:11 Laurent Pinchart wrote:
> On Wednesday 30 May 2012 13:29:06 Michel Dänzer wrote:
> > On Mit, 2012-05-30 at 00:58 +0200, Laurent Pinchart wrote:
> > > DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
> > > for KMS drivers.
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > ---
> > >
> > > drivers/gpu/drm/drm_irq.c | 5 ++++-
> > > 1 files changed, 4 insertions(+), 1 deletions(-)
> > >
> > > My understanding of the DRM framework tells me that calling
> > > DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could
> > > also
> > > mess up its internal state. Did I get it right ?
> >
> > Yes, good catch.
> >
> > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> > > index c798eea..03f16f3 100644
> > > --- a/drivers/gpu/drm/drm_irq.c
> > > +++ b/drivers/gpu/drm/drm_irq.c
> > > @@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
> > >
> > > * drm_vblank_pre_modeset - account for vblanks across mode sets
> > > * @dev: DRM device
> > > * @crtc: CRTC in question
> > > - * @post: post or pre mode set?
> > > *
> > > * Account for vblank events across mode setting events, which will
> > > likely
> > > * reset the hardware frame counter.
> >
> > This hunk should really be in a separate patch,
>
> I've thought about sending a separate patch, but as the change only touched
> a single line of comment related to the same function, I ended up not
> splitting it. I can resubmit two patches if needed.
Ping ? Dave, could you take the patch in your tree ? I can split it if needed.
> > but other than that
> >
> > Reviewed-by: Michel Dänzer <michel@daenzer.net>
>
> Thank you.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
2012-07-17 15:01 ` Laurent Pinchart
@ 2012-07-17 20:06 ` Dave Airlie
0 siblings, 0 replies; 5+ messages in thread
From: Dave Airlie @ 2012-07-17 20:06 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Michel Dänzer, dri-devel
On Wed, Jul 18, 2012 at 1:01 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wednesday 30 May 2012 19:12:11 Laurent Pinchart wrote:
>> On Wednesday 30 May 2012 13:29:06 Michel Dänzer wrote:
>> > On Mit, 2012-05-30 at 00:58 +0200, Laurent Pinchart wrote:
>> > > DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
>> > > for KMS drivers.
>> > >
>> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> > > ---
>> > >
>> > > drivers/gpu/drm/drm_irq.c | 5 ++++-
>> > > 1 files changed, 4 insertions(+), 1 deletions(-)
>> > >
>> > > My understanding of the DRM framework tells me that calling
>> > > DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could
>> > > also
>> > > mess up its internal state. Did I get it right ?
>> >
>> > Yes, good catch.
>> >
>> > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
>> > > index c798eea..03f16f3 100644
>> > > --- a/drivers/gpu/drm/drm_irq.c
>> > > +++ b/drivers/gpu/drm/drm_irq.c
>> > > @@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
>> > >
>> > > * drm_vblank_pre_modeset - account for vblanks across mode sets
>> > > * @dev: DRM device
>> > > * @crtc: CRTC in question
>> > > - * @post: post or pre mode set?
>> > > *
>> > > * Account for vblank events across mode setting events, which will
>> > > likely
>> > > * reset the hardware frame counter.
>> >
>> > This hunk should really be in a separate patch,
>>
>> I've thought about sending a separate patch, but as the change only touched
>> a single line of comment related to the same function, I ended up not
>> splitting it. I can resubmit two patches if needed.
>
> Ping ? Dave, could you take the patch in your tree ? I can split it if needed.
Pulled as-is, thanks, sorry for delay.
Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-17 20:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 22:58 [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers Laurent Pinchart
2012-05-30 11:29 ` Michel Dänzer
2012-05-30 17:12 ` Laurent Pinchart
2012-07-17 15:01 ` Laurent Pinchart
2012-07-17 20:06 ` Dave Airlie
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.