From: David Lechner <david@lechnology.com>
To: "Noralf Trønnes" <noralf@tronnes.org>, dri-devel@lists.freedesktop.org
Cc: drawat@vmware.com
Subject: Re: [PATCH 4/4] drm/tinydrm: Use damage helper for dirtyfb
Date: Thu, 10 Jan 2019 19:06:44 -0600 [thread overview]
Message-ID: <1b42b893-71d0-37ca-7869-9c99da0cf2c6@lechnology.com> (raw)
In-Reply-To: <20190109174956.43052-5-noralf@tronnes.org>
On 1/9/19 11:49 AM, Noralf Trønnes wrote:
> This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty
> handler. All flushing will now happen in the pipe functions.
>
> Also enable the damage plane property for all except repaper which can
> only do full updates.
>
> ili9225:
> This change made ili9225_init() equal to mipi_dbi_init() so use it.
>
> Cc: David Lechner <david@lechnology.com>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
...
> +static void ili9225_pipe_update(struct drm_simple_display_pipe *pipe,
> + struct drm_plane_state *old_state)
> +{
> + struct drm_plane_state *state = pipe->plane.state;
> + struct drm_crtc *crtc = &pipe->crtc;
> + struct drm_rect rect;
> +
> + if (drm_atomic_helper_damage_merged(old_state, state, &rect))
> + ili9225_fb_dirty(state->fb, &rect);
> +
> + if (crtc->state->event) {
> + spin_lock_irq(&crtc->dev->event_lock);
> + drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + spin_unlock_irq(&crtc->dev->event_lock);
> + crtc->state->event = NULL;
> + }
> +}
It looks like this function body is repeated 4 times with the only
difference being the dirty function. Perhaps a helper function is
called for?
Also, I was going to test out this series the displays that I have,
but I guess I will wait until it is easier to apply the patches.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-01-11 1:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 17:49 [PATCH 0/4] drm/tinydrm: Use damage helper for dirtyfb Noralf Trønnes
2019-01-09 17:49 ` [PATCH 1/4] drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() Noralf Trønnes
2019-01-09 20:46 ` Daniel Vetter
2019-01-09 17:49 ` [PATCH 2/4] drm/damage-helper: Add drm_atomic_helper_damage_merged() Noralf Trønnes
2019-01-10 13:04 ` Noralf Trønnes
2019-01-09 17:49 ` [PATCH 3/4] drm/tinydrm: Use struct drm_rect Noralf Trønnes
2019-01-09 17:49 ` [PATCH 4/4] drm/tinydrm: Use damage helper for dirtyfb Noralf Trønnes
2019-01-11 1:06 ` David Lechner [this message]
2019-01-11 16:16 ` Noralf Trønnes
2019-01-11 19:18 ` kbuild test robot
2019-01-09 18:26 ` [PATCH 0/4] " Sam Ravnborg
2019-01-09 18:59 ` Noralf Trønnes
2019-01-09 20:49 ` Daniel Vetter
2019-01-10 17:22 ` Deepak Singh Rawat
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=1b42b893-71d0-37ca-7869-9c99da0cf2c6@lechnology.com \
--to=david@lechnology.com \
--cc=drawat@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=noralf@tronnes.org \
/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