Message ID | CAJ+F1CKQNpJ+=i3wq2JDJi8Z+tyK1=wBEmYTE=NfNJ20VKEoDA@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Di, 2016-06-14 at 12:13 +0200, Marc-André Lureau wrote: > Hi > > On Tue, May 31, 2016 at 2:52 PM, Gerd Hoffmann <kraxel@redhat.com> wrote: > > Pick up the correct source rectangle from framebuffer. > > Without this multihead setups are not working correctly. > > > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > > Additionally, I had to modify the page_flip() function to take the > plane source coordinates for virgl/3d multihead to work. Feel free to > squash. This is in progress of being sorted, by dropping the virtio_gpu_page_flip function altogether in favor of atomic helpers, which will use the (already fixed) plane callbacks instead. See nonblocking commit support patches by Daniel Vetter on this list. cheers, Gerd
--- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -68,11 +68,16 @@ static int virtio_gpu_page_flip(struct drm_crtc *crtc, 0, 0, NULL); } virtio_gpu_cmd_set_scanout(vgdev, output->index, handle, - crtc->mode.hdisplay, - crtc->mode.vdisplay, 0, 0); - virtio_gpu_cmd_resource_flush(vgdev, handle, 0, 0, - crtc->mode.hdisplay, - crtc->mode.vdisplay); + plane->state->src_w >> 16, + plane->state->src_h >> 16, + plane->state->src_x >> 16, + plane->state->src_y >> 16); + + virtio_gpu_cmd_resource_flush(vgdev, handle, + plane->state->src_x >> 16, + plane->state->src_y >> 16, + plane->state->src_w >> 16, + plane->state->src_h); > --- > drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++++++++++++++++++-------------