From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 1/2] vmwgfx: Emulate depth 32 framebuffers Date: Mon, 24 Oct 2011 18:20:37 -0400 Message-ID: <20111024222037.GE5527@phenom.dumpdata.com> References: <20111024212528.GH2441@phenom.dumpdata.com> <1678380380.230236.1319493683484.JavaMail.root@zimbra-prod-mbox-2.vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by gabe.freedesktop.org (Postfix) with ESMTP id 654569E8E1 for ; Mon, 24 Oct 2011 15:20:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1678380380.230236.1319493683484.JavaMail.root@zimbra-prod-mbox-2.vmware.com> 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: Jakob Bornecrantz Cc: Thomas Hellstrom , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Oct 24, 2011 at 03:01:23PM -0700, Jakob Bornecrantz wrote: > > ----- Original Message ----- > > On Sat, Oct 22, 2011 at 10:29:33AM +0200, Thomas Hellstrom wrote: > > > From: Jakob Bornecrantz > > > > > > Signed-off-by: Jakob Bornecrantz > > > Signed-off-by: Thomas Hellstrom > > > --- > > > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 +++++++++- > > > 1 files changed, 9 insertions(+), 1 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c > > > b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c > > > index 39b99db..00ec619 100644 > > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c > > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c > > > @@ -679,6 +679,7 @@ static int do_dmabuf_define_gmrfb(struct > > > drm_file *file_priv, > > > struct vmw_private *dev_priv, > > > struct vmw_framebuffer *framebuffer) > > > { > > > + int depth = framebuffer->base.depth; > > > size_t fifo_size; > > > int ret; > > > > > > @@ -687,6 +688,13 @@ static int do_dmabuf_define_gmrfb(struct > > > drm_file *file_priv, > > > SVGAFifoCmdDefineGMRFB body; > > > } *cmd; > > > > > > + /* Emulate RGBA support, contrary to svga_reg.h this is not > > > + * supported by hosts. This is only a problem if we are reading > > > > Uh, what if it becomes supported at some point? Should there be some > > check against the host version? > > > > (Thinking that some user might be running this older driver with a > > newer host that des support 32 - won't that cause issues?) > > We can add a check then, from the point of view of userspace 32 bit > framebuffers works fine. The problem is with the readback ioctl where > the readback pixels alpha will be clobbered. We also don't support > depths of 30 R10G10B10X2. > > If we add support for depth 32 and/or depth 30 formats we can add > params to tell userspace about that, right now there isn't really a > point to them since they will always return not supported and we > need to do any work around in userspace anyways. sounds reasonable. > > Cheers, Jakob.