From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Ben Davis <Ben.Davis@arm.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Cc: nd <nd@arm.com>, Liviu Dudau <Liviu.Dudau@arm.com>,
Brian Starkey <Brian.Starkey@arm.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"maxime.ripard@bootlin.com" <maxime.ripard@bootlin.com>,
"sean@poorly.run" <sean@poorly.run>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] drm: Add writeback_w,h properties
Date: Wed, 10 Apr 2019 13:48:51 +0200 [thread overview]
Message-ID: <209a6f72-32b6-e546-4fd3-4c27d087d13c@linux.intel.com> (raw)
In-Reply-To: <4509c625676508caf2b3f5035d901d8fe862fa76.1554891327.git.ben.davis@arm.com>
Op 10-04-2019 om 13:11 schreef Ben Davis:
> Add new properties to specify width and height for writeback.
>
> Signed-off-by: Ben Davis <ben.davis@arm.com>
> ---
> drivers/gpu/drm/drm_atomic_uapi.c | 8 ++++++++
> drivers/gpu/drm/drm_writeback.c | 28 ++++++++++++++++++++++++++++
> include/drm/drm_connector.h | 4 ++++
> include/drm/drm_mode_config.h | 10 ++++++++++
> 4 files changed, 50 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> index d520a04..1f68dce 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -765,6 +765,10 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
> return -EINVAL;
> }
> state->content_protection = val;
> + } else if (property == config->prop_writeback_w) {
> + state->writeback_w = val;
> + } else if (property == config->prop_writeback_h) {
> + state->writeback_h = val;
> } else if (property == config->writeback_fb_id_property) {
> struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val);
> int ret = drm_atomic_set_writeback_fb_for_connector(state, fb);
> @@ -837,6 +841,10 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
> *val = state->scaling_mode;
> } else if (property == connector->content_protection_property) {
> *val = state->content_protection;
> + } else if (property == config->prop_writeback_w) {
> + *val = state->writeback_w;
> + } else if (property == config->prop_writeback_h) {
> + *val = state->writeback_h;
> } else if (property == config->writeback_fb_id_property) {
> /* Writeback framebuffer is one-shot, write and forget */
> *val = 0;
> diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
> index c20e6fe..be42073 100644
> --- a/drivers/gpu/drm/drm_writeback.c
> +++ b/drivers/gpu/drm/drm_writeback.c
> @@ -74,6 +74,12 @@
> * applications making use of writeback connectors *always* retrieve an
> * out-fence for the commit and use it appropriately.
> * From userspace, this property will always read as zero.
> + *
> + * "WRITEBACK_W":
> + * The width of the writeback buffer to write back.
> + *
> + * "WRITEBACK_H":
> + * The height of the writeback buffer to write back.
What happens when they are not set, and left to default 0?
~Maarten
next prev parent reply other threads:[~2019-04-10 11:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 11:11 [PATCH 0/2] Add writeback scaling Ben Davis
2019-04-10 11:11 ` [PATCH 1/2] drm: Add writeback_w,h properties Ben Davis
2019-04-10 11:48 ` Maarten Lankhorst [this message]
2019-04-10 16:46 ` Ben Davis
2019-04-10 16:55 ` Maarten Lankhorst
2019-04-10 11:11 ` [PATCH 2/2] drm/malidp: Enable writeback scaling Ben Davis
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=209a6f72-32b6-e546-4fd3-4c27d087d13c@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=Ben.Davis@arm.com \
--cc=Brian.Starkey@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=nd@arm.com \
--cc=sean@poorly.run \
/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;
as well as URLs for NNTP newsgroup(s).