All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	VMware Graphics <linux-graphics-maintainer@vmware.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 07/21] drm/vmwgfx: Add FIXME comments for customer page_flip handlers
Date: Thu,  4 Oct 2018 22:24:32 +0200	[thread overview]
Message-ID: <20181004202446.22905-8-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20181004202446.22905-1-daniel.vetter@ffwll.ch>

The idea behind allowing drivers to override legacy ioctls (instead of
using the generic implementations unconditionally) is to handle bugs
in old driver-specific userspace. Like e.g. vmw_kms_set_config does,
to work around some vmwgfx userspace not clearing its ioctl structs
properly.

But you can't use it to augment semantics and put in additional
checks, since from a correctly working userspace's pov there should
not be any difference in behaviour between the legacy and the atomic
paths.

vmwgfx seems to be doing some strange things in its page_flip
handlers. Since I'm not an expert of this codebase just wrap some
FIXME comments around the potentially problematic code.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 333418dc259f..0bdf785f2aad 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -326,6 +326,7 @@ static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc,
 	struct vmw_private *dev_priv = vmw_priv(crtc->dev);
 	int ret;
 
+	/* FIMXE: This check needs to be moved into ->atomic_check code. */
 	if (!vmw_kms_crtc_flippable(dev_priv, crtc))
 		return -EINVAL;
 
@@ -335,6 +336,7 @@ static int vmw_sou_crtc_page_flip(struct drm_crtc *crtc,
 		return ret;
 	}
 
+	/* FIMXE: This code needs to be moved into ->atomic_commit callbacks. */
 	if (vmw_crtc_to_du(crtc)->is_implicit)
 		vmw_kms_update_implicit_fb(dev_priv, crtc);
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index c3e435f444c1..b8f4be159f91 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -501,6 +501,7 @@ static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc,
 	struct vmw_screen_target_display_unit *stdu = vmw_crtc_to_stdu(crtc);
 	int ret;
 
+	/* FIMXE: This check needs to be moved into ->atomic_check code. */
 	if (!stdu->defined || !vmw_kms_crtc_flippable(dev_priv, crtc))
 		return -EINVAL;
 
-- 
2.19.0.rc2

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

  parent reply	other threads:[~2018-10-04 20:25 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 20:24 [PATCH 00/21] atomic helper cleanup, take 2 Daniel Vetter
2018-10-04 20:24 ` [PATCH 01/21] drm/amdgpu: Remove default best_encoder hook from DC Daniel Vetter
2018-10-05 15:41   ` Harry Wentland
2018-10-05 20:13     ` Leo Li
2018-10-04 20:24 ` [PATCH 02/21] drm/atomic-helper: Unexport drm_atomic_helper_best_encoder Daniel Vetter
2018-10-04 20:24 ` [PATCH 03/21] drm: Extract drm_atomic_state_helper.[hc] Daniel Vetter
2018-10-04 20:24 ` [PATCH 04/21] drm/vmwgfx: Don't look at state->allow_modeset Daniel Vetter
2018-10-04 20:24 ` [PATCH 05/21] drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property Daniel Vetter
2018-10-04 22:40   ` Thomas Hellstrom
2018-10-05  6:43     ` Daniel Vetter
2018-10-05  7:48       ` Daniel Vetter
2018-10-05 18:19         ` Thomas Hellstrom
2018-10-05 18:30           ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 06/21] drm/atomic: Improve docs for drm_atomic_state->allow_modeset Daniel Vetter
2018-10-04 20:24 ` Daniel Vetter [this message]
2018-10-04 20:24 ` [PATCH 08/21] drm/arcpgu: Drop transitional hooks Daniel Vetter
2018-10-04 20:24 ` [PATCH 09/21] drm/atmel: " Daniel Vetter
2018-10-04 20:24   ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 10/21] drm/arcpgu: Use drm_atomic_helper_shutdown Daniel Vetter
     [not found] ` <20181004202446.22905-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2018-10-04 20:24   ` [PATCH 11/21] drm/msm: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 12/21] drm/sti: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 13/21] drm/vc4: " Daniel Vetter
2018-10-04 20:24 ` [PATCH 14/21] drm/zte: " Daniel Vetter
2018-10-05 13:07   ` Shawn Guo
2018-10-04 20:24 ` [PATCH 15/21] drm: Remove transitional helpers Daniel Vetter
2018-10-04 21:04   ` Sam Ravnborg
2018-10-05  6:10     ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 16/21] drm/vmwgfx: Fix vmw_du_cursor_plane_atomic_check Daniel Vetter
2018-10-05 16:06   ` Daniel Vetter
2018-10-05 16:21     ` Thomas Hellstrom
2018-10-05 20:46       ` Daniel Vetter
2018-10-05 20:53         ` Thomas Hellstrom
2018-10-04 20:24 ` [PATCH 17/21] drm: Unexport drm_plane_helper_check_update Daniel Vetter
2018-10-04 21:03   ` Sam Ravnborg
2018-10-05  6:13     ` Daniel Vetter
2018-10-04 20:24 ` [PATCH 18/21] drm: Unexport primary plane helpers Daniel Vetter
2018-10-04 21:14   ` Sam Ravnborg
2018-10-05  6:18     ` Daniel Vetter
2018-10-05  9:47   ` [PATCH] " Daniel Vetter
2018-10-04 20:24 ` [PATCH 19/21] drm/doc: fix drm_driver_legacy_fb_format Daniel Vetter
2018-10-05  5:07   ` Gerd Hoffmann
2018-10-04 20:24 ` [PATCH 20/21] drm/todo: Add some cleanup tasks Daniel Vetter
2018-10-04 20:35   ` Ville Syrjälä
2018-10-05 16:07   ` Harry Wentland
2018-10-05 16:20     ` Eric Engestrom
2018-10-04 20:24 ` [PATCH 21/21] drm/doc: kerneldoc for quirk_addfb_prefer_xbgr_30bpp Daniel Vetter
2018-10-24 10:01   ` Alexandru-Cosmin Gheorghe
2018-10-24 12:19     ` Daniel Vetter

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=20181004202446.22905-8-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --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.