Commit df1c93ba authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie

drm/vmwgfx: Don't promote updates from GMR-backed scanouts to fullscreen.

That's unnecessary since partial screen updates from GMRs are fast.
Also fix cliprect pointer dereferencing
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 194fda0d
...@@ -553,9 +553,7 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer, ...@@ -553,9 +553,7 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer,
} *cmd; } *cmd;
int i, increment = 1; int i, increment = 1;
if (!num_clips || if (!num_clips) {
!(dev_priv->fifo.capabilities &
SVGA_FIFO_CAP_SCREEN_OBJECT)) {
num_clips = 1; num_clips = 1;
clips = &norect; clips = &norect;
norect.x1 = norect.y1 = 0; norect.x1 = norect.y1 = 0;
...@@ -574,10 +572,10 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer, ...@@ -574,10 +572,10 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer,
for (i = 0; i < num_clips; i++, clips += increment) { for (i = 0; i < num_clips; i++, clips += increment) {
cmd[i].header = cpu_to_le32(SVGA_CMD_UPDATE); cmd[i].header = cpu_to_le32(SVGA_CMD_UPDATE);
cmd[i].body.x = cpu_to_le32(clips[i].x1); cmd[i].body.x = cpu_to_le32(clips->x1);
cmd[i].body.y = cpu_to_le32(clips[i].y1); cmd[i].body.y = cpu_to_le32(clips->y1);
cmd[i].body.width = cpu_to_le32(clips[i].x2 - clips[i].x1); cmd[i].body.width = cpu_to_le32(clips->x2 - clips->x1);
cmd[i].body.height = cpu_to_le32(clips[i].y2 - clips[i].y1); cmd[i].body.height = cpu_to_le32(clips->y2 - clips->y1);
} }
vmw_fifo_commit(dev_priv, sizeof(*cmd) * num_clips); vmw_fifo_commit(dev_priv, sizeof(*cmd) * num_clips);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment