summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2017-10-19 10:34:07 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2017-10-19 10:34:07 -0500
commit1fb65ffba4c73ec055e5ae6fce88ec7c2a2bbefb (patch)
treefbc5b8ded129fd3e25948a3b4a150e123c1049e7
parentd7799750bf66c2b5a8d137c5144d983236ff1ef0 (diff)
downloadkernel-1fb65ffba4c73ec055e5ae6fce88ec7c2a2bbefb.tar.gz
kernel-1fb65ffba4c73ec055e5ae6fce88ec7c2a2bbefb.tar.xz
kernel-1fb65ffba4c73ec055e5ae6fce88ec7c2a2bbefb.zip
fix qxl patch for git am
-rw-r--r--qxl-fixes.patch48
1 files changed, 24 insertions, 24 deletions
diff --git a/qxl-fixes.patch b/qxl-fixes.patch
index 5572266a0..558204ac5 100644
--- a/qxl-fixes.patch
+++ b/qxl-fixes.patch
@@ -156,10 +156,10 @@ Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
4 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
-index 8ec53d5..c0fb52c 100644
+index 74fc936..3eb9208 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
-@@ -387,7 +387,11 @@ void qxl_io_create_primary(struct qxl_device *qdev,
+@@ -388,7 +388,11 @@ void qxl_io_create_primary(struct qxl_device *qdev,
create->width = bo->surf.width;
create->height = bo->surf.height;
create->stride = bo->surf.stride;
@@ -169,11 +169,11 @@ index 8ec53d5..c0fb52c 100644
+ } else {
+ create->mem = qxl_bo_physical_address(qdev, bo, offset);
+ }
-
- DRM_DEBUG_DRIVER("mem = %llx, from %p\n", create->mem, bo->kptr);
-
+
+ QXL_INFO(qdev, "%s: mem = %llx, from %p\n", __func__, create->mem,
+ bo->kptr);
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
-index afbf50d..4756b3c 100644
+index afc2272..da6648e 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -305,7 +305,9 @@ static const struct drm_crtc_funcs qxl_crtc_funcs = {
@@ -181,23 +181,23 @@ index afbf50d..4756b3c 100644
{
struct qxl_framebuffer *qxl_fb = to_qxl_framebuffer(fb);
+ struct qxl_bo *bo = gem_to_qxl_bo(qxl_fb->obj);
-
+
+ WARN_ON(bo->shadow);
drm_gem_object_unreference_unlocked(qxl_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(qxl_fb);
-@@ -508,6 +510,7 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
+@@ -511,6 +513,7 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
.x2 = qfb->base.width,
.y2 = qfb->base.height
};
+ bool same_shadow = false;
-
+
if (old_state->fb) {
qfb_old = to_qxl_framebuffer(old_state->fb);
-@@ -519,15 +522,23 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
+@@ -522,15 +525,23 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
if (bo == bo_old)
return;
-
+
+ if (bo_old && bo_old->shadow && bo->shadow &&
+ bo_old->shadow == bo->shadow) {
+ same_shadow = true;
@@ -209,7 +209,7 @@ index afbf50d..4756b3c 100644
+ qxl_io_destroy_primary(qdev);
bo_old->is_primary = false;
}
-
+
if (!bo->is_primary) {
- qxl_io_create_primary(qdev, 0, bo);
+ if (!same_shadow)
@@ -219,22 +219,22 @@ index afbf50d..4756b3c 100644
+
qxl_draw_dirty_fb(qdev, qfb, bo, 0, 0, &norect, 1, 1);
}
-
-@@ -679,8 +690,9 @@ static void qxl_cursor_atomic_disable(struct drm_plane *plane,
- static int qxl_plane_prepare_fb(struct drm_plane *plane,
- struct drm_plane_state *new_state)
+
+@@ -682,8 +693,9 @@ void qxl_cursor_atomic_disable(struct drm_plane *plane,
+ int qxl_plane_prepare_fb(struct drm_plane *plane,
+ struct drm_plane_state *new_state)
{
+ struct qxl_device *qdev = plane->dev->dev_private;
struct drm_gem_object *obj;
- struct qxl_bo *user_bo;
+ struct qxl_bo *user_bo, *old_bo = NULL;
int ret;
-
+
if (!new_state->fb)
-@@ -689,6 +701,32 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
+@@ -692,6 +704,32 @@ int qxl_plane_prepare_fb(struct drm_plane *plane,
obj = to_qxl_framebuffer(new_state->fb)->obj;
user_bo = gem_to_qxl_bo(obj);
-
+
+ if (plane->type == DRM_PLANE_TYPE_PRIMARY &&
+ user_bo->is_dumb && !user_bo->shadow) {
+ if (plane->state->fb) {
@@ -264,7 +264,7 @@ index afbf50d..4756b3c 100644
ret = qxl_bo_pin(user_bo, QXL_GEM_DOMAIN_CPU, NULL);
if (ret)
return ret;
-@@ -713,6 +751,11 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
+@@ -716,6 +754,11 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
obj = to_qxl_framebuffer(old_state->fb)->obj;
user_bo = gem_to_qxl_bo(obj);
qxl_bo_unpin(user_bo);
@@ -274,13 +274,13 @@ index afbf50d..4756b3c 100644
+ user_bo->shadow = NULL;
+ }
}
-
+
static const uint32_t qxl_cursor_plane_formats[] = {
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
-index d707b35..08752c0 100644
+index 3591d23..b5e9dc6 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
-@@ -89,6 +89,8 @@ struct qxl_bo {
+@@ -112,6 +112,8 @@ struct qxl_bo {
/* Constant after initialization */
struct drm_gem_object gem_base;
bool is_primary; /* is this now a primary surface */
@@ -302,5 +302,5 @@ index 5e65d5d..11085ab 100644
args->handle = handle;
return 0;
--
-cgit v0.12
+2.13.5