From patchwork Wed Dec 1 10:59:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MAYURESH JANORKAR X-Patchwork-Id: 370911 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 oB1AxpoM015299 for ; Wed, 1 Dec 2010 10:59:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046Ab0LAK7t (ORCPT ); Wed, 1 Dec 2010 05:59:49 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:49181 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147Ab0LAK7t convert rfc822-to-8bit (ORCPT ); Wed, 1 Dec 2010 05:59:49 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id oB1AxiDR012828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Dec 2010 04:59:46 -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 oB1AxhX2003989; Wed, 1 Dec 2010 16:29:43 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Wed, 1 Dec 2010 16:29:44 +0530 From: "Janorkar, Mayuresh" To: "tomi.valkeinen@nokia.com" , "linux-omap@vger.kernel.org" CC: "Janorkar, Mayuresh" Date: Wed, 1 Dec 2010 16:29:42 +0530 Subject: [PATCH] OMAP: DSS2: Adding check_timings and set_timings for panel-taal Thread-Topic: [PATCH] OMAP: DSS2: Adding check_timings and set_timings for panel-taal Thread-Index: AcuRRtuQhUlST3VATPyUicah61rt9A== 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]); Wed, 01 Dec 2010 10:59:51 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index e1c765d..e29c308 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -476,6 +476,29 @@ 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 +1586,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",