Re: [PATCH 6/9] drm/ast: Add primary plane

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

 



On Tue, Nov 05, 2019 at 10:51:02AM +0100, Gerd Hoffmann wrote:
> > +static const struct drm_plane_funcs ast_primary_plane_funcs = {
> > +	.update_plane = drm_atomic_helper_update_plane,
> > +	.disable_plane = drm_atomic_helper_disable_plane,
> > +	.destroy = drm_plane_cleanup,
> > +	.reset = drm_atomic_helper_plane_reset,
> > +	.set_property = NULL,
> > +	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> > +	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> > +	.atomic_set_property = NULL,
> > +	.atomic_get_property = NULL,
> 
> It's not needed to explicitly set optional function pointers to NULL.

Yeah leaving them out completely helps a lot with grepping over all the
drivers to find users of stuff.
-Daniel

> 
> >  static const struct drm_encoder_helper_funcs ast_enc_helper_funcs = {
> >  	.dpms = ast_encoder_dpms,
> >  	.prepare = ast_encoder_prepare,
> > @@ -976,10 +1045,33 @@ static void ast_cursor_fini(struct drm_device *dev)
> >  
> >  int ast_mode_init(struct drm_device *dev)
> >  {
> > +	static const uint32_t primary_plane_formats[] = {
> > +		DRM_FORMAT_XRGB8888,
> > +		DRM_FORMAT_RGB565,
> > +		DRM_FORMAT_C8,
> > +	};
> 
> I'd suggest to move this out of the function.
> 
> cheers,
>   Gerd
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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