hwc: Add a handle to the can_scale function for future use
A scaling decision may need to account for the size of
a pixel as dss based scaling capability has a relationship
with memory bandwidth
Change-Id: Idd68e11317fb0bb9e5d19f0a0d5818744968a5ab
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit c53e458106e6c4346c092bf34d623ac11848f6bd)
diff --git a/hwc/hwc.c b/hwc/hwc.c
index bf66ec7..d715f13 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -880,7 +880,7 @@
static int omap4_hwc_can_scale(__u32 src_w, __u32 src_h, __u32 dst_w, __u32 dst_h, int is_2d,
struct dsscomp_display_info *dis, struct dsscomp_platform_info *limits,
- __u32 pclk)
+ __u32 pclk, void *handle)
{
__u32 fclk = limits->fclk / 1000;
__u32 min_src_w = DIV_ROUND_UP(src_w, is_2d ? limits->max_xdecim_2d : limits->max_xdecim_1d);
@@ -935,7 +935,7 @@
/* NOTE: layers should be able to be scaled externally since
framebuffer is able to be scaled on selected external resolution */
return omap4_hwc_can_scale(src_w, src_h, dst_w, dst_h, is_NV12(handle), &hwc_dev->fb_dis, &limits,
- hwc_dev->fb_dis.timings.pixel_clock);
+ hwc_dev->fb_dis.timings.pixel_clock, handle);
}
static int omap4_hwc_is_valid_layer(omap4_hwc_device_t *hwc_dev,
@@ -1090,7 +1090,7 @@
(d.modedb[i].vmode & ~FB_VMODE_INTERLACED) ||
!omap4_hwc_can_scale(xres, yres, ext_fb_xres, ext_fb_yres,
1, &d.dis, &limits,
- 1000000000 / d.modedb[i].pixclock))
+ 1000000000 / d.modedb[i].pixclock, NULL))
continue;
/* prefer CEA modes */
@@ -1165,7 +1165,7 @@
if (!d.dis.timings.pixel_clock ||
!omap4_hwc_can_scale(xres, yres, ext_fb_xres, ext_fb_yres,
1, &d.dis, &limits,
- d.dis.timings.pixel_clock)) {
+ d.dis.timings.pixel_clock, NULL)) {
ALOGW("DSS scaler cannot support HDMI cloning");
return -1;
}