From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhenyu Wang Subject: Re: [RFC PATCH 2/7] drm/i915/gvt: Use meta fbs to stand for vGPU's planes Date: Mon, 3 Dec 2018 16:35:45 +0800 Message-ID: <20181203083545.GT12743@zhen-hp.sh.intel.com> References: <1543822522-3413-1-git-send-email-tina.zhang@intel.com> <1543822522-3413-3-git-send-email-tina.zhang@intel.com> <20181203082104.GS12743@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1618930924==" Return-path: In-Reply-To: <20181203082104.GS12743@zhen-hp.sh.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Zhang, Tina" Cc: kalyan.kondapally@intel.com, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1618930924== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xhJxprRH8Q4al5cy" Content-Disposition: inline --xhJxprRH8Q4al5cy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018.12.03 16:21:04 +0800, Zhenyu Wang wrote: > On 2018.12.03 15:35:17 +0800, Tina Zhang wrote: > > Create and initialize vGPU meta framebuffers during vGPU's creation. > > Each meta framebuffer is an intel_framebuffer. Userspace can get the > > userspace visible identifier of that meta framebuffer by accessing > > plane_id_index attribute. > >=20 > > For example: > > In "/sys/bus/pci/devices/0000\:00\:02.0/$vGPU_id/intel_vgpu/" directory, > >=20 > > /* plane_id_index: pipe#(bit16:8) and plane#(bit7:0)*/ > > echo "0x10" > plane_index_id //Set the index to the plane 0 of pipe 1 > >=20 > > /* > > * Dump userspace visible identifier of the meta framebuffer > > * standing for the primary plane of the vGPU's pipe one > > */ > > cat plane_index_id //dump the id for plane 0 of pipe 1 > >=20 > > Then userspace can use this id with the exsting KMS IOCTL, e.g. > > drmModeSetPlane, to assign a physical plane to this virtual plane. >=20 > How does user know which plane/pipe is active for vGPU? Looks from > current code it has no way to know that. I think for guest display > assignment, we need to know the display state of vGPU and it looks > there's no state tracking, e.g what if guest driver switches to > another plane for display? How could user know that then adjust for > assignment? >=20 > And really don't like sysfs to r/w file for id, even if doesn't use > vfio gfx dmabuf interface for guest display object presentation, a > vendor specific vfio device ioctl if possible is better. > And add that this device specific info sysfs is created when mdev device created before it's opened for vGPU instance. So I don't think it's proper place to put display config info. --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --xhJxprRH8Q4al5cy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCXATq4QAKCRCxBBozTXgY J8WAAJ9/49jV6/09Zn8PNagbnfnF8f6EHwCfV9kz03OlAPbqM51CfUxytlvSuaQ= =evxT -----END PGP SIGNATURE----- --xhJxprRH8Q4al5cy-- --===============1618930924== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1618930924==--