All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak Rawat <drawat.floss@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Wei Liu <wei.liu@kernel.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	David Airlie <airlied@linux.ie>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Michael Kelley <mikelley@microsoft.com>,
	Jork Loeser <jloeser@microsoft.com>, Wei Hu <weh@microsoft.com>,
	K Y Srinivasan <kys@microsoft.com>
Subject: Re: [RFC PATCH 1/2] drm/hyperv: Add DRM driver for hyperv synthetic video device
Date: Mon, 22 Jun 2020 15:20:34 -0700	[thread overview]
Message-ID: <f6923296368dc676df10e75593ebc18575efc476.camel@gmail.com> (raw)
In-Reply-To: <20200622124622.yioa53bvipvd4c42@sirius.home.kraxel.org>

On Mon, 2020-06-22 at 14:46 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > +/* Should be done only once during init and resume */
> > +static int synthvid_update_vram_location(struct hv_device *hdev,
> > +					  phys_addr_t vram_pp)
> > +{
> > +	struct hyperv_device *hv = hv_get_drvdata(hdev);
> > +	struct synthvid_msg *msg = (struct synthvid_msg *)hv->init_buf;
> > +	unsigned long t;
> > +	int ret = 0;
> > +
> > +	memset(msg, 0, sizeof(struct synthvid_msg));
> > +	msg->vid_hdr.type = SYNTHVID_VRAM_LOCATION;
> > +	msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) +
> > +		sizeof(struct synthvid_vram_location);
> > +	msg->vram.user_ctx = msg->vram.vram_gpa = vram_pp;
> > +	msg->vram.is_vram_gpa_specified = 1;
> > +	synthvid_send(hdev, msg);
> 
> That suggests it is possible to define multiple framebuffers in vram,
> then pageflip by setting vram.vram_gpa.  If that is the case I'm
> wondering whenever vram helpers are a better fit maybe?  You don't
> have
> to blit each and every display update then.

Thanks for the review. Unfortunately only the first vmbus message take
effect and subsequent calls are ignored. I originally implemented using
vram helpers but I figured out calling this vmbus message again won't
change the vram location.

> 
> FYI: cirrus goes the blit route because (a) the amount of vram is
> very
> small so trying to store multiple framebuffers there is out of
> question,
> and (b) cirrus converts formats on the fly to hide some hardware
> oddities.
> 
> take care,
>   Gerd
> 


WARNING: multiple messages have this Message-ID (diff)
From: Deepak Rawat <drawat.floss@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: linux-hyperv@vger.kernel.org,
	Stephen Hemminger <sthemmin@microsoft.com>,
	David Airlie <airlied@linux.ie>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,
	dri-devel@lists.freedesktop.org,
	Michael Kelley <mikelley@microsoft.com>,
	Jork Loeser <jloeser@microsoft.com>, Wei Hu <weh@microsoft.com>,
	K Y Srinivasan <kys@microsoft.com>
Subject: Re: [RFC PATCH 1/2] drm/hyperv: Add DRM driver for hyperv synthetic video device
Date: Mon, 22 Jun 2020 15:20:34 -0700	[thread overview]
Message-ID: <f6923296368dc676df10e75593ebc18575efc476.camel@gmail.com> (raw)
In-Reply-To: <20200622124622.yioa53bvipvd4c42@sirius.home.kraxel.org>

On Mon, 2020-06-22 at 14:46 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > +/* Should be done only once during init and resume */
> > +static int synthvid_update_vram_location(struct hv_device *hdev,
> > +					  phys_addr_t vram_pp)
> > +{
> > +	struct hyperv_device *hv = hv_get_drvdata(hdev);
> > +	struct synthvid_msg *msg = (struct synthvid_msg *)hv->init_buf;
> > +	unsigned long t;
> > +	int ret = 0;
> > +
> > +	memset(msg, 0, sizeof(struct synthvid_msg));
> > +	msg->vid_hdr.type = SYNTHVID_VRAM_LOCATION;
> > +	msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) +
> > +		sizeof(struct synthvid_vram_location);
> > +	msg->vram.user_ctx = msg->vram.vram_gpa = vram_pp;
> > +	msg->vram.is_vram_gpa_specified = 1;
> > +	synthvid_send(hdev, msg);
> 
> That suggests it is possible to define multiple framebuffers in vram,
> then pageflip by setting vram.vram_gpa.  If that is the case I'm
> wondering whenever vram helpers are a better fit maybe?  You don't
> have
> to blit each and every display update then.

Thanks for the review. Unfortunately only the first vmbus message take
effect and subsequent calls are ignored. I originally implemented using
vram helpers but I figured out calling this vmbus message again won't
change the vram location.

> 
> FYI: cirrus goes the blit route because (a) the amount of vram is
> very
> small so trying to store multiple framebuffers there is out of
> question,
> and (b) cirrus converts formats on the fly to hide some hardware
> oddities.
> 
> take care,
>   Gerd
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-06-22 22:20 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 11:06 [RFC PATCH 0/2] DRM driver for hyper-v synthetic video device Deepak Rawat
2020-06-22 11:06 ` Deepak Rawat
2020-06-22 11:06 ` [RFC PATCH 1/2] drm/hyperv: Add DRM driver for hyperv " Deepak Rawat
2020-06-22 11:06   ` Deepak Rawat
2020-06-22 12:46   ` Gerd Hoffmann
2020-06-22 12:46     ` Gerd Hoffmann
2020-06-22 22:20     ` Deepak Rawat [this message]
2020-06-22 22:20       ` Deepak Rawat
2020-06-23  9:42       ` Daniel Vetter
2020-06-23  9:42         ` Daniel Vetter
2020-06-23 16:17         ` Gerd Hoffmann
2020-06-23 16:17           ` Gerd Hoffmann
2020-06-25  0:47           ` Deepak Rawat
2020-06-25  0:47             ` Deepak Rawat
2020-06-22 15:19   ` Sam Ravnborg
2020-06-22 15:19     ` Sam Ravnborg
2020-06-22 22:43     ` Deepak Rawat
2020-06-22 22:43       ` Deepak Rawat
2020-06-23  7:59     ` Thomas Zimmermann
2020-06-23  7:59       ` Thomas Zimmermann
2020-06-23  9:12       ` Deepak Rawat
2020-06-23  9:12         ` Deepak Rawat
2020-06-23  9:19         ` Thomas Zimmermann
2020-06-23  9:19           ` Thomas Zimmermann
2020-06-22 18:45   ` kernel test robot
2020-06-23  2:31   ` Dexuan Cui
2020-06-23  2:31     ` Dexuan Cui
2020-06-23  6:48     ` Deepak Rawat
2020-06-23  6:48       ` Deepak Rawat
2020-06-23 21:58       ` Dexuan Cui
2020-06-23 21:58         ` Dexuan Cui
2020-06-22 11:06 ` [RFC PATCH 2/2] MAINTAINERS: Add maintainer for hyperv " Deepak Rawat
2020-06-22 11:06   ` Deepak Rawat
2020-06-28 23:01 ` [RFC PATCH 0/2] DRM driver for hyper-v synthetic " Daniel Vetter
2020-06-28 23:01   ` Daniel Vetter
2020-09-10  8:19 [RFC PATCH 1/2] drm/hyperv: Add DRM driver for hyperv " Tang, Shaofeng
2020-09-11  0:38 ` Deepak Rawat
2020-11-15  9:14   ` Thomas Zimmermann
2020-11-15 17:55     ` Deepak Rawat
2020-11-15 18:58       ` Thomas Zimmermann
2020-11-16  9:58         ` Daniel Vetter
2020-11-16 16:36           ` Deepak Rawat
2020-09-28 15:58 Marcin Skarbek

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=f6923296368dc676df10e75593ebc18575efc476.camel@gmail.com \
    --to=drawat.floss@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=haiyangz@microsoft.com \
    --cc=jloeser@microsoft.com \
    --cc=kraxel@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=sthemmin@microsoft.com \
    --cc=weh@microsoft.com \
    --cc=wei.liu@kernel.org \
    /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.