All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Thomas Hellstrom <thellstrom@vmware.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] vmwgfx: Emulate depth 32 framebuffers
Date: Mon, 24 Oct 2011 17:25:28 -0400	[thread overview]
Message-ID: <20111024212528.GH2441@phenom.dumpdata.com> (raw)
In-Reply-To: <1319272174-13368-1-git-send-email-thellstrom@vmware.com>

On Sat, Oct 22, 2011 at 10:29:33AM +0200, Thomas Hellstrom wrote:
> From: Jakob Bornecrantz <jakob@vmware.com>
> 
> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> ---
>  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?)

> +	 * this value later and expecting what we uploaded back.
> +	 */
> +	if (depth == 32)
> +		depth = 24;
> +
>  	fifo_size = sizeof(*cmd);
>  	cmd = kmalloc(fifo_size, GFP_KERNEL);
>  	if (unlikely(cmd == NULL)) {
> @@ -697,7 +705,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file *file_priv,
>  	memset(cmd, 0, fifo_size);
>  	cmd->header = SVGA_CMD_DEFINE_GMRFB;
>  	cmd->body.format.bitsPerPixel = framebuffer->base.bits_per_pixel;
> -	cmd->body.format.colorDepth = framebuffer->base.depth;
> +	cmd->body.format.colorDepth = depth;
>  	cmd->body.format.reserved = 0;
>  	cmd->body.bytesPerLine = framebuffer->base.pitch;
>  	cmd->body.ptr.gmrId = framebuffer->user_handle;
> -- 
> 1.7.4.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2011-10-24 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22  8:29 [PATCH 1/2] vmwgfx: Emulate depth 32 framebuffers Thomas Hellstrom
2011-10-22  8:29 ` [PATCH 2/2] vmwgfx: Don't pass unused arguments to do_dirty functions Thomas Hellstrom
2011-10-24 21:25 ` Konrad Rzeszutek Wilk [this message]
2011-10-24 22:01   ` [PATCH 1/2] vmwgfx: Emulate depth 32 framebuffers Jakob Bornecrantz
2011-10-24 22:20     ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111024212528.GH2441@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.