atomisp: make dvs envelop size match to atomisp size step
authorKalle Lampila <kallex.lampila@intel.com>
Tue, 17 Apr 2012 13:11:50 +0000 (16:11 +0300)
committerbuildbot <buildbot@intel.com>
Mon, 23 Apr 2012 15:22:06 +0000 (08:22 -0700)
BZ: 31288

This patch fixes issues set 1920x1088 resolution when dvs is
enabled. Dvs envelop height did not match to atomisp height step so
this patch make width and height round down nearest width and height
that match to steps.

Change-Id: I3ec862476f86537627f6245601f23db0d10f3346
Signed-off-by: Kalle Lampila <kallex.lampila@intel.com>
Reviewed-on: http://android.intel.com:8080/43842
Reviewed-by: Toivonen, Tuukka <tuukka.toivonen@intel.com>
Reviewed-by: Wang, Wen W <wen.w.wang@intel.com>
Reviewed-by: Cohen, David A <david.a.cohen@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/atomisp_cmd.c

index 19fcee4..654b75a 100644 (file)
@@ -3068,6 +3068,8 @@ static void atomisp_set_dis_envelop(struct atomisp_device *isp,
                 */
                *dvs_env_w = width / 5;
                *dvs_env_h = height / 5;
+               *dvs_env_w = *dvs_env_w - *dvs_env_w % ATOM_ISP_STEP_WIDTH;
+               *dvs_env_h = *dvs_env_h - *dvs_env_h % ATOM_ISP_STEP_HEIGHT;
                sh_css_video_set_dis_envelope(*dvs_env_w, *dvs_env_h);
        } else {
                /* if DVS gets disabled, make sure it's indeed turned off */