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: Thomas Hellstrom <thellstrom@vmware.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	VMware Graphics <linux-graphics-maintainer@vmware.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 14/14] drm/vmwgfx: Add FIXME comments for customer page_flip handlers
Date: Mon,  3 Sep 2018 18:54:39 +0200	[thread overview]
Message-ID: <20180903165439.24845-14-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20180903165439.24845-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 4c68ad6f3605..8e692334c3b9 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 f5b2fe8a7793..1913e086d015 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.18.0

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

  parent reply	other threads:[~2018-09-03 16:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 16:54 [PATCH 01/14] drm: Add drm/kernel.h header file Daniel Vetter
2018-09-03 16:54 ` [PATCH 02/14] drm: Drop drmP.h from drm_connector.c Daniel Vetter
2018-09-03 16:54 ` [PATCH 03/14] drm: drop drmP.h include from drm_plane.c Daniel Vetter
2018-09-03 16:54 ` [PATCH 04/14] drm: drop drmP.h include from drm_crtc.c Daniel Vetter
2018-09-03 16:54 ` [PATCH 05/14] drm/atomic: trim driver interface/docs Daniel Vetter
     [not found] ` <20180903165439.24845-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2018-09-03 16:54   ` [PATCH 06/14] drm: extract drm_atomic_uapi.c Daniel Vetter
2018-09-04 20:41     ` Rodrigo Vivi
2018-09-05  7:55       ` Daniel Vetter
     [not found]     ` <20180903165439.24845-6-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2018-09-05  8:00       ` [PATCH] " Daniel Vetter
2018-09-03 16:54 ` [PATCH 07/14] drm/atomic-helper: Unexport drm_atomic_helper_best_encoder Daniel Vetter
2018-09-03 16:54 ` [PATCH 08/14] drm/amdgpu: Remove default best_encoder hook from DC Daniel Vetter
2018-09-05 13:45   ` Leo Li
2018-09-05 13:48     ` Daniel Vetter
2018-09-06 16:33       ` Deucher, Alexander
2018-09-06 22:12         ` Daniel Vetter
2018-09-03 16:54 ` [PATCH 09/14] drm: Update todo.rst Daniel Vetter
2018-09-03 17:24   ` Sam Ravnborg
2018-09-03 17:38   ` [Intel-gfx] " Emil Velikov
2018-09-04 12:19     ` Daniel Vetter
2018-09-04 20:52       ` Emil Velikov
2018-09-05  8:04   ` [PATCH] " Daniel Vetter
2018-09-03 16:54 ` [PATCH 10/14] drm: Extract drm_atomic_state_helper.[hc] Daniel Vetter
2018-09-03 16:54 ` [PATCH 11/14] drm/vmwgfx: Remove confused comment from vmw_du_connector_atomic_set_property Daniel Vetter
2018-09-03 16:54 ` [PATCH 12/14] drm/vmwgfx: Don't look at state->allow_modeset Daniel Vetter
2018-09-03 16:54 ` [PATCH 13/14] drm/atomic: Improve docs for drm_atomic_state->allow_modeset Daniel Vetter
2018-09-03 16:54 ` Daniel Vetter [this message]
2018-09-04 13:45   ` [PATCH 14/14] drm/vmwgfx: Add FIXME comments for customer page_flip handlers Thomas Hellstrom
2018-09-04 14:19     ` Daniel Vetter
2018-09-03 17:47 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/14] drm: Add drm/kernel.h header file Patchwork
2018-09-03 17:53 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-03 18:05 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-09-05  8:09 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/14] drm: Add drm/kernel.h header file (rev3) Patchwork
2018-09-05  8:15 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-05  8:26 ` ✗ Fi.CI.BAT: failure " Patchwork

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=20180903165439.24845-14-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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.