Re: [PATCH] drm: Don't oops in drm_calc_timestamping_constants() if drm_vblank_init() wasn't called

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

 



ville.syrjala@xxxxxxxxxxxxxxx writes:

> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>
> Seems the crtc helpers call drm_calc_timestamping_constants()
> unconditionally even if the driver didn't initialize vblank support by
> calling drm_vblank_init(). That used to be OK since the constants were
> stored under drm_crtc.
>
> However I broke this with
> commit eba1f35dfe14 ("drm: Move timestamping constants into drm_vblank_crtc")
> when I moved the constants to live inside the drm_vblank_crtc struct
> instead. If drm_vblank_init() isn't called, we don't allocate these
> structures, and so drm_calc_timestamping_constants() will oops.
>
> Fix it by adding a check into drm_calc_timestamping_constants() to see
> if vblank support was initialized at all. And to keep in line with other
> such checks, also toss in a check and warn for the case where vblank
> support was initialized, but the wrong number of crtcs was specified.

That was fast, thanks!  Works for me.

Tested-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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