From patchwork Wed Mar 7 09:01:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 10250 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1S5Cl5-0002ro-RM for patchwork@linuxtv.org; Wed, 07 Mar 2012 10:02:07 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1S5Cl1-00039G-IF; Wed, 07 Mar 2012 10:02:06 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826Ab2CGJBi (ORCPT ); Wed, 7 Mar 2012 04:01:38 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:54460 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241Ab2CGJBh (ORCPT ); Wed, 7 Mar 2012 04:01:37 -0500 Received: from dlep26.itg.ti.com ([157.170.170.121]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q2791ata021848; Wed, 7 Mar 2012 03:01:37 -0600 Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2791awh004923; Wed, 7 Mar 2012 03:01:36 -0600 (CST) Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Wed, 7 Mar 2012 03:01:36 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2791a7K007389; Wed, 7 Mar 2012 03:01:36 -0600 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.216]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q2791YW27408; Wed, 7 Mar 2012 03:01:34 -0600 (CST) From: Archit Taneja To: CC: , , , Archit Taneja Subject: [PATCH] omap_vout: Set DSS overlay_info only if paddr is non zero Date: Wed, 7 Mar 2012 14:31:16 +0530 Message-ID: <1331110876-11895-1-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.7.85115 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' The omap_vout driver tries to set the DSS overlay_info using set_overlay_info() when the physical address for the overlay is still not configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). The calls to omapvid_init(which internally calls set_overlay_info()) are removed from these functions. They don't need to be called as the omap_vout_device struct anyway maintains the overlay related changes made. Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), this was used to set the paddr, this isn't needed as omapvid_init() does the same thing later. These changes are required as the DSS2 driver since 3.3 kernel doesn't let you set the overlay info with paddr as 0. Signed-off-by: Archit Taneja Tested-by: Laurent Pinchart --- drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- 1 files changed, 5 insertions(+), 31 deletions(-) diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 1fb7d5b..dffcf66 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, /* set default crop and win */ omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); - /* Save the changes in the overlay strcuture */ - ret = omapvid_init(vout, 0); - if (ret) { - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); - goto s_fmt_vid_out_exit; - } - ret = 0; s_fmt_vid_out_exit: @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) omap_dispc_register_isr(omap_vout_isr, vout, mask); - for (j = 0; j < ovid->num_overlays; j++) { - struct omap_overlay *ovl = ovid->overlays[j]; - - if (ovl->manager && ovl->manager->device) { - struct omap_overlay_info info; - ovl->get_overlay_info(ovl, &info); - info.paddr = addr; - if (ovl->set_overlay_info(ovl, &info)) { - ret = -EINVAL; - goto streamon_err1; - } - } - } - /* First save the configuration in ovelray structure */ ret = omapvid_init(vout, addr); if (ret) @@ -2071,11 +2050,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev) } video_set_drvdata(vfd, vout); - /* Configure the overlay structure */ - ret = omapvid_init(vid_dev->vouts[k], 0); - if (!ret) - goto success; + dev_info(&pdev->dev, ": registered and initialized" + " video device %d\n", vfd->minor); + if (k == (pdev->num_resources - 1)) + return 0; + continue; error2: if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) omap_vout_release_vrfb(vout); @@ -2085,12 +2065,6 @@ error1: error: kfree(vout); return ret; - -success: - dev_info(&pdev->dev, ": registered and initialized" - " video device %d\n", vfd->minor); - if (k == (pdev->num_resources - 1)) - return 0; } return -ENODEV;