From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755570AbcEaHbG (ORCPT ); Tue, 31 May 2016 03:31:06 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35550 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751462AbcEaHbD (ORCPT ); Tue, 31 May 2016 03:31:03 -0400 Date: Tue, 31 May 2016 09:30:49 +0200 From: Daniel Vetter To: Gerd Hoffmann Cc: dri-devel@redhat.com, open list , "open list:VIRTIO GPU DRIVER" , "open list:VIRTIO GPU DRIVER" Subject: Re: [PATCH] virtio-gpu: fix output lookup Message-ID: <20160531073049.GA30560@phenom.ffwll.local> Mail-Followup-To: Gerd Hoffmann , dri-devel@redhat.com, open list , "open list:VIRTIO GPU DRIVER" , "open list:VIRTIO GPU DRIVER" References: <1464609806-22013-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464609806-22013-1-git-send-email-kraxel@redhat.com> X-Operating-System: Linux phenom 4.6.0-rc5+ User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 30, 2016 at 02:03:26PM +0200, Gerd Hoffmann wrote: > Needed for multihead setups where we can have disabled > outputs and therefore plane->crtc can be NULL. > > Signed-off-by: Gerd Hoffmann Applied to drm-misc, thanks. -Daniel > --- > drivers/gpu/drm/virtio/virtgpu_plane.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c > index 70b44a2..e50674b 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_plane.c > +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c > @@ -63,11 +63,17 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane, > { > struct drm_device *dev = plane->dev; > struct virtio_gpu_device *vgdev = dev->dev_private; > - struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(plane->crtc); > + struct virtio_gpu_output *output = NULL; > struct virtio_gpu_framebuffer *vgfb; > struct virtio_gpu_object *bo; > uint32_t handle; > > + if (plane->state->crtc) > + output = drm_crtc_to_virtio_gpu_output(plane->state->crtc); > + if (old_state->crtc) > + output = drm_crtc_to_virtio_gpu_output(old_state->crtc); > + WARN_ON(!output); > + > if (plane->state->fb) { > vgfb = to_virtio_gpu_framebuffer(plane->state->fb); > bo = gem_to_virtio_gpu_obj(vgfb->obj); > -- > 1.8.3.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch