From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers Date: Wed, 30 May 2012 19:12:11 +0200 Message-ID: <2679315.909faE8pzZ@avalon> References: <1338332289-24389-1-git-send-email-laurent.pinchart@ideasonboard.com> <1338377346.25194.203.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id B86D59E954 for ; Wed, 30 May 2012 10:12:17 -0700 (PDT) In-Reply-To: <1338377346.25194.203.camel@thor.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Michel =?ISO-8859-1?Q?D=E4nzer?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi Michel, On Wednesday 30 May 2012 13:29:06 Michel D=E4nzer 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 > > --- > > = > > 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 a= lso > > 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 splitti= ng = it. I can resubmit two patches if needed. > but other than that > = > Reviewed-by: Michel D=E4nzer Thank you. -- = Regards, Laurent Pinchart