Skip to content

Commit 0b0f728

Browse files
bparrottomba
authored andcommitted
drm/omap: Add ovl checking funcs to dispc_ops
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 <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d484c20 commit 0b0f728

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/gpu/drm/omapdrm/dss/dispc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,8 @@ static u32 dispc_ovl_get_burst_size(struct dispc_device *dispc,
12811281
return dispc->feat->burst_size_unit * 8;
12821282
}
12831283

1284-
static bool dispc_ovl_color_mode_supported(struct dispc_device *dispc,
1285-
enum omap_plane_id plane, u32 fourcc)
1284+
bool dispc_ovl_color_mode_supported(struct dispc_device *dispc,
1285+
enum omap_plane_id plane, u32 fourcc)
12861286
{
12871287
const u32 *modes;
12881288
unsigned int i;
@@ -2489,6 +2489,11 @@ static int dispc_ovl_calc_scaling_44xx(struct dispc_device *dispc,
24892489
return 0;
24902490
}
24912491

2492+
enum omap_overlay_caps dispc_ovl_get_caps(struct dispc_device *dispc, enum omap_plane_id plane)
2493+
{
2494+
return dispc->feat->overlay_caps[plane];
2495+
}
2496+
24922497
#define DIV_FRAC(dividend, divisor) \
24932498
((dividend) * 100 / (divisor) - ((dividend) / (divisor) * 100))
24942499

drivers/gpu/drm/omapdrm/dss/dss.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ const u32 *dispc_ovl_get_color_modes(struct dispc_device *dispc,
398398
enum omap_plane_id plane);
399399

400400
void dispc_ovl_get_max_size(struct dispc_device *dispc, u16 *width, u16 *height);
401+
bool dispc_ovl_color_mode_supported(struct dispc_device *dispc,
402+
enum omap_plane_id plane, u32 fourcc);
403+
enum omap_overlay_caps dispc_ovl_get_caps(struct dispc_device *dispc, enum omap_plane_id plane);
401404

402405
u32 dispc_read_irqstatus(struct dispc_device *dispc);
403406
void dispc_clear_irqstatus(struct dispc_device *dispc, u32 mask);

0 commit comments

Comments
 (0)