dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	chen@aspeedtech.com, dri-devel@lists.freedesktop.org,
	airlied@redhat.com, sam@ravnborg.org
Subject: Re: [PATCH 6/9] drm/ast: Add primary plane
Date: Tue, 5 Nov 2019 10:54:48 +0100	[thread overview]
Message-ID: <20191105095448.GA10326@phenom.ffwll.local> (raw)
In-Reply-To: <20191105095102.qjqgh3ghx7tctk43@sirius.home.kraxel.org>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-11-05  9:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 15:49 [PATCH 0/9] drm/ast: Convert to atomic modesetting Thomas Zimmermann
2019-10-28 15:49 ` [PATCH 1/9] drm/ast: Remove last traces of struct ast_gem_object Thomas Zimmermann
2019-11-05  9:42   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 2/9] drm/ast: Check video-mode requirements against VRAM size Thomas Zimmermann
2019-11-05  9:42   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 3/9] drm/ast: Don't clear base address and offset with default values Thomas Zimmermann
2019-11-05  9:44   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 4/9] drm/ast: Split ast_set_ext_reg() into color and threshold function Thomas Zimmermann
2019-11-05  9:45   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 5/9] drm/ast: Split ast_set_vbios_mode_info() Thomas Zimmermann
2019-11-05  9:47   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 6/9] drm/ast: Add primary plane Thomas Zimmermann
2019-11-05  9:51   ` Gerd Hoffmann
2019-11-05  9:54     ` Daniel Vetter [this message]
2019-11-06  8:24     ` Thomas Zimmermann
2019-10-28 15:49 ` [PATCH 7/9] drm/ast: Add CRTC helpers for atomic modesetting Thomas Zimmermann
2019-11-05  9:51   ` Gerd Hoffmann
2019-10-28 15:49 ` [PATCH 8/9] drm/ast: Add cursor plane Thomas Zimmermann
2019-11-05  9:52   ` Gerd Hoffmann
2019-11-05  9:55   ` Daniel Vetter
2019-11-06  8:31     ` Thomas Zimmermann
2019-11-06  9:05       ` Daniel Vetter
2019-11-06  9:46         ` Thomas Zimmermann
2019-10-28 15:49 ` [PATCH 9/9] drm/ast: Enable atomic modesetting Thomas Zimmermann
2019-11-05  9:57   ` Gerd Hoffmann
2019-11-05 10:31     ` Daniel Vetter
2019-11-06  8:28       ` Thomas Zimmermann
2019-11-06 13:36     ` Thomas Zimmermann
2019-11-07  6:55       ` Gerd Hoffmann
2019-11-07  7:32         ` Thomas Zimmermann
2019-10-28 16:00 ` [PATCH 0/9] drm/ast: Convert to " Thomas Zimmermann
2019-10-28 16:00   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191105095448.GA10326@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=chen@aspeedtech.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox