From patchwork Fri Dec 17 14:57:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MAYURESH JANORKAR X-Patchwork-Id: 415951 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBHEw3sA027250 for ; Fri, 17 Dec 2010 14:58:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755022Ab0LQO6B (ORCPT ); Fri, 17 Dec 2010 09:58:01 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:50496 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754989Ab0LQO6B convert rfc822-to-8bit (ORCPT ); Fri, 17 Dec 2010 09:58:01 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBHEvvcn006933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Dec 2010 08:58:00 -0600 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBHEvvl2012849 for ; Fri, 17 Dec 2010 20:27:57 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Fri, 17 Dec 2010 20:27:57 +0530 From: "Janorkar, Mayuresh" To: "linux-omap@vger.kernel.org" CC: "Janorkar, Mayuresh" Date: Fri, 17 Dec 2010 20:27:55 +0530 Subject: [PATCH v2]: OMAP: DSS2: Adding check_timings and set_timings for panel-taal Thread-Topic: [PATCH v2]: OMAP: DSS2: Adding check_timings and set_timings for panel-taal Thread-Index: Acud+sl4NP3Ta2LTRyGGywU2/yhNmg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Dec 2010 14:58:03 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index e1c765d..0bb2c30 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -476,6 +476,31 @@ static void taal_get_timings(struct omap_dss_device *dssdev, *timings = dssdev->panel.timings; } +static void taal_set_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + /* + * TAAL panel's timing struct has only x_res and y_res + * other timing parameters are not set + */ + dssdev->panel.timings.x_res = timings->x_res; + dssdev->panel.timings.y_res = timings->y_res; +} + +static int taal_check_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + /* + * TAAL panel's timing struct has only x_res and y_res + * other timing parameters are not set + */ + if (!timings || timings->x_res != dssdev->panel.timings.x_res || + timings->y_res != dssdev->panel.timings.y_res) + return -EINVAL; + + return 0; +} + static void taal_get_resolution(struct omap_dss_device *dssdev, u16 *xres, u16 *yres) { @@ -1563,6 +1588,8 @@ static struct omap_dss_driver taal_driver = { .memory_read = taal_memory_read, .get_timings = taal_get_timings, + .set_timings = taal_set_timings, + .check_timings = taal_check_timings, .driver = { .name = "taal",