aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dsscomp/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dsscomp/device.c')
-rw-r--r--drivers/video/omap2/dsscomp/device.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/drivers/video/omap2/dsscomp/device.c b/drivers/video/omap2/dsscomp/device.c
index 53a81bb..b68abfd 100644
--- a/drivers/video/omap2/dsscomp/device.c
+++ b/drivers/video/omap2/dsscomp/device.c
@@ -39,14 +39,19 @@
#include <video/omapdss.h>
#include <video/dsscomp.h>
+#include <plat/android-display.h>
#include <plat/dsscomp.h>
#include "dsscomp.h"
+#include "../dss/dss_features.h"
+#include "../dss/dss.h"
#include <linux/debugfs.h>
static DECLARE_WAIT_QUEUE_HEAD(waitq);
static DEFINE_MUTEX(wait_mtx);
+static struct dsscomp_platform_info platform_info;
+
static u32 hwc_virt_to_phys(u32 arg)
{
pmd_t *pmd;
@@ -353,7 +358,7 @@ static long query_display(struct dsscomp_dev *cdev,
static long check_ovl(struct dsscomp_dev *cdev,
struct dsscomp_check_ovl_data *chk)
{
- /* for now return all overlays as possible */
+ /* for now return all overlays as possstruct dsscomp_dev *cdevible */
return (1 << cdev->num_ovls) - 1;
}
@@ -413,6 +418,32 @@ static void fill_cache(struct dsscomp_dev *cdev)
cdev->wb_ovl ? 1 : 0);
}
+static void fill_platform_info(struct dsscomp_dev *cdev)
+{
+ struct dsscomp_platform_info *p = &platform_info;
+
+ p->max_xdecim_1d = 16;
+ p->max_xdecim_2d = 16;
+ p->max_ydecim_1d = 16;
+ p->max_ydecim_2d = 2;
+
+ p->fclk = dss_feat_get_param_max(FEAT_PARAM_DSS_FCK);
+ /*
+ * :TODO: for now overwrite with actual fclock as dss will not scale
+ * fclock based on composition
+ */
+ p->fclk = dispc_fclk_rate();
+
+ p->min_width = 2;
+ p->max_width = 2048;
+ p->max_height = 2048;
+
+ p->max_downscale = 4;
+ p->integer_scale_ratio_limit = 2048;
+
+ p->tiler1d_slot_size = tiler1d_slot_size(cdev);
+}
+
static long comp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
int r = 0;
@@ -487,6 +518,13 @@ static long comp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
r = copy_from_user(&u.sdis, ptr, sizeof(u.sdis)) ? :
setup_display(cdev, &u.sdis);
+ break;
+ }
+ case DSSCIOC_QUERY_PLATFORM:
+ {
+ /* :TODO: for now refill platform info as it is dynamic */
+ r = copy_to_user(ptr, &platform_info, sizeof(platform_info));
+ break;
}
default:
r = -EINVAL;
@@ -564,6 +602,7 @@ static int dsscomp_probe(struct platform_device *pdev)
pr_info("dsscomp: initializing.\n");
fill_cache(cdev);
+ fill_platform_info(cdev);
/* initialize queues */
dsscomp_queue_init(cdev);