Re: [PATCH] drm/fb-helper: generic: Fix drm_fbdev_client_restore()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 28, 2019 at 11:25:28AM +0100, Noralf Trønnes wrote:
> 
> 
> Den 28.01.2019 07.48, skrev Gerd Hoffmann:
> >> Fix by using drm_fb_helper_lastclose() which checks if fbdev is in use.
> > 
> >>  static int drm_fbdev_client_restore(struct drm_client_dev *client)
> >>  {
> >> -	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
> >> -
> >> -	drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
> >> +	drm_fb_helper_lastclose(client->dev);
> >>  
> >>  	return 0;
> >>  }
> > 
> > Hmm, at least the drm_fb_helper_lastclose() version I'm looking at
> > (branch drm-misc-next) just calls
> > drm_fb_helper_restore_fbdev_mode_unlocked without any check ...
> > 
> 
> drm_fb_helper_lastclose() uses drm_device->fb_helper which is NULL if
> fbdev is not in use,

Ah, ok.  In contrast drm_fb_helper_from_client() never returns NULL.
Missed that detail.

Reviewed-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux