mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mihail Atanassov <mihail.atanassov@arm.com>
To: <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	"David Airlie" <airlied@linux.ie>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Brian Starkey <brian.starkey@arm.com>,
	<linux-kernel@vger.kernel.org>, <nd@arm.com>
Subject: [RFC] drm: Helper macro for drm state duplication
Date: Thu, 9 Feb 2017 15:41:41 +0000	[thread overview]
Message-ID: <1486654902-2558-1-git-send-email-mihail.atanassov@arm.com> (raw)

Hi,

I was working on a few patches adding fields to struct malidp_crtc_state and
found myself writing memcpy multiple times in the ->atomic_duplicate_state
hook because I wanted to avoid copying the drm_crtc_state twice
(__drm_atomic_helper_crtc_duplicate_state copies it already). I figured this
also applies to the other drm_*_state derivatives, so I concocted a macro
helper to do the copy in one chunk (two if you count the __drm_atomic_helper*
one). I'd appreciate some comments on whether anyone else might find this
macro useful. Thanks!

Mihail Atanassov (1):
  drm: Add helper macro for duplicating custom drm_*_state

 include/drm/drm_atomic_helper.h | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

-- 
Mihail Atanassov

             reply	other threads:[~2017-02-09 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 15:41 Mihail Atanassov [this message]
2017-02-09 15:41 ` [PATCH] drm: Add helper macro for duplicating custom drm_*_state Mihail Atanassov
2017-02-09 17:35   ` Daniel Vetter
2017-02-09 17:38   ` Daniel Vetter
2017-02-09 16:57 ` [RFC] drm: Helper macro for drm state duplication Daniel Vetter
2017-02-09 17:18   ` Liviu Dudau

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=1486654902-2558-1-git-send-email-mihail.atanassov@arm.com \
    --to=mihail.atanassov@arm.com \
    --cc=airlied@linux.ie \
    --cc=brian.starkey@arm.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=nd@arm.com \
    --cc=seanpaul@chromium.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

all inboxes | Powered by JetHome®