From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 12/17] drm: convert crtc to properties/state Date: Mon, 26 May 2014 18:46:30 +0300 Message-ID: <20140526154630.GK27580@intel.com> References: <1400956226-28053-1-git-send-email-robdclark@gmail.com> <1400956226-28053-13-git-send-email-robdclark@gmail.com> <20140526093110.GC14357@phenom.ffwll.local> <20140526152305.GJ27580@intel.com> <20140526153757.GZ14357@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id A6C666E342 for ; Mon, 26 May 2014 08:46:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140526153757.GZ14357@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, May 26, 2014 at 05:37:57PM +0200, Daniel Vetter wrote: > On Mon, May 26, 2014 at 06:23:05PM +0300, Ville Syrj=E4l=E4 wrote: > > On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: > > > On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: > > > > @@ -92,7 +100,18 @@ int drm_atomic_set_event(struct drm_device *dev, > > > > struct drm_atomic_state *state, struct drm_mode_object *obj, > > > > struct drm_pending_vblank_event *event) > > > > { > > > > - return -EINVAL; /* for now */ > > > > + switch (obj->type) { > > > > + case DRM_MODE_OBJECT_CRTC: { > > > > + struct drm_crtc_state *cstate =3D > > > > + drm_atomic_get_crtc_state(obj_to_crtc(obj), state); > > > > + if (IS_ERR(cstate)) > > > > + return PTR_ERR(cstate); > > > > + cstate->event =3D event; > > > > + return 0; > > > > + } > > > > + default: > > > > + return -EINVAL; > > > > + } > > > = > > > Hm, I think if we only want completion events on crtcs (which I agree= on) > > = > > I don't. Unless you have a nice way of passing some kind of "fbs now > > available for rendering" list back to userland in the single crtc > > event. Last time I looked making the drm event stuff deal with > > variable length events looked more painful than just adding per > > plane events. But I must admit that I didn't really try to do it. > = > Hm, why can't userspace keep a list of fb ids involved in a given crtc > pageflip around and index those with the cookie we pass around? > = > I really don't see why the kernel has to implement a half-baked event > multiplexer (which just copies the same thing n times), while userspace is > perfectly capable of doing that itself? > = > Now if the timestamps would be genuinely different then I'd agree, but > then that's not an atomic update. User space can't do it if flips get issued faster than the vrefresh rate. I still want my "moar fps" triple buffering mode. -- = Ville Syrj=E4l=E4 Intel OTC