From patchwork Wed Apr 17 15:17:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 2459671 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 56FDADF2E5 for ; Thu, 18 Apr 2013 11:13:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 688A9E65EB for ; Thu, 18 Apr 2013 04:13:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from service88.mimecast.com (service88.mimecast.com [195.130.217.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 353A6E6719 for ; Wed, 17 Apr 2013 08:24:38 -0700 (PDT) Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 17 Apr 2013 16:17:37 +0100 Received: from hornet.Cambridge.Arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Apr 2013 16:17:36 +0100 From: Pawel Moll To: linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [RFC 02/10] video: display: Update the display with the video mode data Date: Wed, 17 Apr 2013 16:17:14 +0100 Message-Id: <1366211842-21497-3-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> X-OriginalArrivalTime: 17 Apr 2013 15:17:36.0217 (UTC) FILETIME=[B1058490:01CE3B7E] X-MC-Unique: 113041716173716201 X-Mailman-Approved-At: Thu, 18 Apr 2013 04:09:27 -0700 Cc: Russell King - ARM Linux , Laurent Pinchart , Pawel Moll X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org The display entity (sink) may need to know about the mode being changed, eg. to update timings. Alternatively there could be a separate set_mode() operation... Signed-off-by: Pawel Moll --- drivers/video/display/display-core.c | 5 +++-- include/video/display.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/video/display/display-core.c b/drivers/video/display/display-core.c index d2daa15..4b8e45a 100644 --- a/drivers/video/display/display-core.c +++ b/drivers/video/display/display-core.c @@ -69,12 +69,13 @@ EXPORT_SYMBOL_GPL(display_entity_set_state); * * Return 0 on success or a negative error code otherwise. */ -int display_entity_update(struct display_entity *entity) +int display_entity_update(struct display_entity *entity, + const struct videomode *mode) { if (!entity->ops.ctrl || !entity->ops.ctrl->update) return 0; - return entity->ops.ctrl->update(entity); + return entity->ops.ctrl->update(entity, mode); } EXPORT_SYMBOL_GPL(display_entity_update); diff --git a/include/video/display.h b/include/video/display.h index 90d18ca..64f84d5 100644 --- a/include/video/display.h +++ b/include/video/display.h @@ -77,7 +77,8 @@ struct display_entity_interface_params { struct display_entity_control_ops { int (*set_state)(struct display_entity *ent, enum display_entity_state state); - int (*update)(struct display_entity *ent); + int (*update)(struct display_entity *ent, + const struct videomode *mode); int (*get_modes)(struct display_entity *ent, const struct videomode **modes); int (*get_params)(struct display_entity *ent, @@ -111,7 +112,8 @@ struct display_entity { int display_entity_set_state(struct display_entity *entity, enum display_entity_state state); -int display_entity_update(struct display_entity *entity); +int display_entity_update(struct display_entity *entity, + const struct videomode *mode); int display_entity_get_modes(struct display_entity *entity, const struct videomode **modes); int display_entity_get_params(struct display_entity *entity,