From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756073AbcEaG31 (ORCPT ); Tue, 31 May 2016 02:29:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35310 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755908AbcEaG3X convert rfc822-to-8bit (ORCPT ); Tue, 31 May 2016 02:29:23 -0400 Message-ID: <1464676160.5978.24.camel@redhat.com> Subject: Re: [PATCH] Add virtio gpu driver. From: Gerd Hoffmann To: Daniel Vetter Cc: virtio-dev@lists.oasis-open.org, "Michael S. Tsirkin" , "open list:ABI/API" , Rusty Russell , open list , "open list:DRM DRIVERS" , "open list:VIRTIO CORE, NET..." , Dave Airlie Date: Tue, 31 May 2016 08:29:20 +0200 In-Reply-To: <20160530144755.GK27098@phenom.ffwll.local> References: <1427213239-8775-1-git-send-email-kraxel@redhat.com> <20150324165057.GN1349@phenom.ffwll.local> <1427718227.3372.33.camel@nilsson.home.kraxel.org> <20150330144927.GN23521@phenom.ffwll.local> <1464335302.10663.10.camel@redhat.com> <20160527090313.GX27098@phenom.ffwll.local> <1464616236.5179.41.camel@redhat.com> <20160530144755.GK27098@phenom.ffwll.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 31 May 2016 06:29:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > Why attach the hotspot to the plane? Wouldn't it make more sense to > > make it a framebuffer property? > > We don't have properties on the framebuffer. I guess you /could/ just add > it internally to struct drm_framebuffer, and not bother exposing to > userspace. I guess that would be a lot simpler, Yes. I can simply stick the hotspot into drm_framebuffer in drm_mode_cursor_universal() and pick up the values in the driver's plane update function. > but it also means that > atomic userspace can't use hotspots before we add properties to fbs. And > doing that is a bit tricky since drm_framebuffer objects are meant to be > invariant - this assumption is deeply in-grained into the code all over > the place, everything just compares pointers when semantically it means to > compare the entire fb (including backing storage pointer/offsets and > everything). Hmm, the hotspot location for a given cursor image is invariant too, so I don't think that would be a big issue. I'd expect userspace define a bunch of cursors, then switch between them (instead of defining a single cursor, then constantly updating it). cheers, Gerd