From: Brian Masney <masneyb@onstation.org>
To: robdclark@gmail.com, sean@poorly.run,
dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org, airlied@linux.ie,
daniel@ffwll.ch, linux-kernel@vger.kernel.org,
linus.walleij@linaro.org, jonathan@marek.ca, robh@kernel.org
Subject: [PATCH RFC v2 2/6] drm: msm: add dirty framebuffer helper
Date: Wed, 8 May 2019 22:03:48 -0400 [thread overview]
Message-ID: <20190509020352.14282-3-masneyb@onstation.org> (raw)
In-Reply-To: <20190509020352.14282-1-masneyb@onstation.org>
Use drm_atomic_helper_dirtyfb() as the dirty callback in the
msm_framebuffer_funcs struct. Call drm_plane_enable_fb_damage_clips()
when the planes are initialized in mdp4, mdp5, and dpu1.
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
Changes since v1:
- Add drm_plane_enable_fb_damage_clips() to plane init for mdp4, mdp5,
and dpu1.
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3 +++
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 3 +++
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 3 +++
drivers/gpu/drm/msm/msm_fb.c | 2 ++
4 files changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index ce1a555e1f31..f3d009a3dc63 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -21,6 +21,7 @@
#include <linux/debugfs.h>
#include <linux/dma-buf.h>
+#include <drm/drm_damage_helper.h>
#include <drm/drm_atomic_uapi.h>
#include "msm_drv.h"
@@ -1540,6 +1541,8 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
if (ret)
DPU_ERROR("failed to install zpos property, rc = %d\n", ret);
+ drm_plane_enable_fb_damage_clips(plane);
+
/* success! finalize initialization */
drm_plane_helper_add(plane, &dpu_plane_helper_funcs);
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
index 005066f7154d..2d46d1126283 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
@@ -15,6 +15,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <drm/drm_damage_helper.h>
#include "mdp4_kms.h"
#define DOWN_SCALE_MAX 8
@@ -391,6 +392,8 @@ struct drm_plane *mdp4_plane_init(struct drm_device *dev,
mdp4_plane_install_properties(plane, &plane->base);
+ drm_plane_enable_fb_damage_clips(plane);
+
return plane;
fail:
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index be13140967b4..fcb6d32c2b38 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -16,6 +16,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <drm/drm_damage_helper.h>
#include <drm/drm_print.h>
#include "mdp5_kms.h"
@@ -1099,6 +1100,8 @@ struct drm_plane *mdp5_plane_init(struct drm_device *dev,
mdp5_plane_install_properties(plane, &plane->base);
+ drm_plane_enable_fb_damage_clips(plane);
+
return plane;
fail:
diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c
index 136058978e0f..8624a8e4025f 100644
--- a/drivers/gpu/drm/msm/msm_fb.c
+++ b/drivers/gpu/drm/msm/msm_fb.c
@@ -16,6 +16,7 @@
*/
#include <drm/drm_crtc.h>
+#include <drm/drm_damage_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_probe_helper.h>
@@ -35,6 +36,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
static const struct drm_framebuffer_funcs msm_framebuffer_funcs = {
.create_handle = drm_gem_fb_create_handle,
.destroy = drm_gem_fb_destroy,
+ .dirty = drm_atomic_helper_dirtyfb,
};
#ifdef CONFIG_DEBUG_FS
--
2.20.1
next prev parent reply other threads:[~2019-05-09 2:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 2:03 [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support Brian Masney
2019-05-09 2:03 ` [PATCH v2 1/6] drm: msm: remove resv fields from msm_gem_object struct Brian Masney
2019-05-13 20:32 ` Bjorn Andersson
2019-05-13 22:25 ` Brian Masney
2019-05-09 2:03 ` Brian Masney [this message]
2019-05-09 2:03 ` [PATCH v2 3/6] ARM: qcom_defconfig: add display-related options Brian Masney
2019-05-09 2:03 ` [PATCH v2 4/6] ARM: dts: msm8974: add display support Brian Masney
2019-05-09 2:03 ` [PATCH v2 5/6] ARM: dts: qcom: msm8974-hammerhead: add support for backlight Brian Masney
2019-05-09 2:03 ` [PATCH v2 6/6] ARM: dts: qcom: msm8974-hammerhead: add support for display Brian Masney
2019-05-09 2:06 ` [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support Brian Masney
2019-05-28 13:46 ` Linus Walleij
2019-05-29 1:17 ` Brian Masney
2019-05-29 1:32 ` [Freedreno] " Jeffrey Hugo
2019-05-29 1:37 ` Brian Masney
2019-05-29 1:42 ` Jeffrey Hugo
2019-05-29 2:46 ` Brian Masney
[not found] ` <CAOCk7NpC93ACr4jFm7SBOKSvFJSDhq2byX6BAYPX29BuYEkWnQ@mail.gmail.com>
2019-05-29 10:28 ` Brian Masney
2019-05-29 14:41 ` Jeffrey Hugo
2019-05-29 19:30 ` Brian Masney
2019-05-29 19:58 ` Jeffrey Hugo
2019-05-29 21:54 ` Brian Masney
2019-05-29 2:14 ` Rob Clark
2019-05-29 2:24 ` [Freedreno] " Jeffrey Hugo
2019-05-29 6:23 ` Linus Walleij
2019-05-29 9:41 ` Brian Masney
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=20190509020352.14282-3-masneyb@onstation.org \
--to=masneyb@onstation.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=robh@kernel.org \
--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
all inboxes | Powered by JetHome®