From: Benoit Parrot <bparrot@ti.com>
To: dri-devel@lists.freedesktop.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jyri Sarha <jsarha@ti.com>
Subject: [RFC 2/3] drm/omap: Add ovl checking funcs to dispc_ops
Date: Fri, 29 Jun 2018 12:02:48 -0500 [thread overview]
Message-ID: <20180629170249.21921-3-bparrot@ti.com> (raw)
In-Reply-To: <20180629170249.21921-1-bparrot@ti.com>
In order to be able to dynamically assign overlays to planes we need to
be able to asses the overlay capabilities.
Add a helper function to be able to retrieve the supported capabilities
of an overlay.
And export the function to check if a fourcc is supported on a given
overlay.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++++++
drivers/gpu/drm/omapdrm/dss/omapdss.h | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 1b7a6ef7897f..80ac1e68a036 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -2508,6 +2508,12 @@ static int dispc_ovl_calc_scaling_44xx(struct dispc_device *dispc,
return 0;
}
+static enum omap_overlay_caps dispc_ovl_get_caps(struct dispc_device *dispc,
+ enum omap_plane_id plane)
+{
+ return dispc->feat->overlay_caps[plane];
+}
+
#define DIV_FRAC(dividend, divisor) \
((dividend) * 100 / (divisor) - ((dividend) / (divisor) * 100))
@@ -4777,6 +4783,8 @@ static const struct dispc_ops dispc_ops = {
.ovl_enable = dispc_ovl_enable,
.ovl_setup = dispc_ovl_setup,
.ovl_get_color_modes = dispc_ovl_get_color_modes,
+ .ovl_color_mode_supported = dispc_ovl_color_mode_supported,
+ .ovl_get_caps = dispc_ovl_get_caps,
.ovl_get_max_size = dispc_ovl_get_max_size,
.wb_get_framedone_irq = dispc_wb_get_framedone_irq,
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 3f264759eecb..01fbd674a021 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -743,6 +743,10 @@ struct dispc_ops {
const u32 *(*ovl_get_color_modes)(struct dispc_device *dispc,
enum omap_plane_id plane);
+ bool (*ovl_color_mode_supported)(struct dispc_device *dispc,
+ enum omap_plane_id plane, u32 fourcc);
+ enum omap_overlay_caps (*ovl_get_caps)(struct dispc_device *dispc,
+ enum omap_plane_id plane);
void (*ovl_get_max_size)(struct dispc_device *dispc,
u16 *width, u16 *height);
--
2.9.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-06-29 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 17:02 [RFC 0/3] drm/omap: Add virtual wide planes support Benoit Parrot
2018-06-29 17:02 ` [RFC 1/3] drm/omap: Add ability to check if requested plane modes can be supported Benoit Parrot
2018-08-02 9:03 ` Tomi Valkeinen
2018-06-29 17:02 ` Benoit Parrot [this message]
2018-06-29 17:02 ` [RFC 3/3] drm/omap: Add wide display support using multiple overlays Benoit Parrot
2018-08-02 10:09 ` Tomi Valkeinen
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=20180629170249.21921-3-bparrot@ti.com \
--to=bparrot@ti.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=peter.ujfalusi@ti.com \
--cc=robdclark@gmail.com \
--cc=tomi.valkeinen@ti.com \
/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