From patchwork Wed Oct 16 19:26:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3057451 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 74E0EBF924 for ; Wed, 16 Oct 2013 20:53:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D2AB2047C for ; Wed, 16 Oct 2013 20:53:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 80EFF204B0 for ; Wed, 16 Oct 2013 20:53:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61B12E6C38 for ; Wed, 16 Oct 2013 13:53:24 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 72D59E7814 for ; Wed, 16 Oct 2013 12:27:33 -0700 (PDT) Received: by mail-qc0-f169.google.com with SMTP id x12so866876qcv.0 for ; Wed, 16 Oct 2013 12:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nd7yeyREr3w063W40Xl9wQRDX1kcaJREHESCBDaS0JE=; b=aZTe5dLMaIfp+FgoSbi/a474L6R71eF3oFvWCaopySrkFZmv+NUrBH+SHz8mSXDXMA B8JHRklxHK3q7843hLz7rISuy8YVtdH67hs81gf6TgywmxFu02XGUsgUXLQYVpTeRaUx nGSS7n6iNLjW744yxgCGm7TkF8TbEFpdM8wao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nd7yeyREr3w063W40Xl9wQRDX1kcaJREHESCBDaS0JE=; b=UlwU70thR0TY7rwfjHK1aO8A6niA8fxN032v1NdZajAB0TkkoP5bgpwFM64zFArSw5 0An4HZ4sC5ZO0qgcPyQ7y/MTkVoaEmRgIi72X9TieZeU1+OMoSI+NSxOhaguXIS6CnLS IRvXmzsgUJXjvfAhRY+MJqjuj5ApZ/OBKeNmI0YePwtSV/OdNgLfhV1VG6nIB91hqju1 Syfx/m9tifTmCfdpoSCyJbFH+Xvagm1YbsUYdrPlWlNtVxqFeDrF+rWiYuTMN5TfLsPQ 3FiqOAM3nZzVZc853lwXbB/tmmOKPhS05Cdf6gXljilc2Iqa/oFCB7FNXQZG8vs2QAmo z5kw== X-Gm-Message-State: ALoCoQmNd+cxiSaWaa0O1gr+wGC1n2wXT5zk+5lbqjILSIglYj4/zAdTfkUEo6Nmb0HGCto5Ex/L X-Received: by 10.224.67.3 with SMTP id p3mr6966076qai.98.1381951652670; Wed, 16 Oct 2013 12:27:32 -0700 (PDT) Received: from seanpaul-glaptop.roam.corp.google.com (cpe-173-095-180-236.nc.res.rr.com. [173.95.180.236]) by mx.google.com with ESMTPSA id 4sm167771575qak.11.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 12:27:32 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v2 17/26] drm/exynos: Add mode_set manager operation Date: Wed, 16 Oct 2013 15:26:47 -0400 Message-Id: <1381951616-12548-18-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381951616-12548-1-git-send-email-seanpaul@chromium.org> References: <1381951616-12548-1-git-send-email-seanpaul@chromium.org> Cc: marcheu@chromium.org 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 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a mode_set callback to the manager operations which sets the crtc's current mode to the manager driver. Signed-off-by: Sean Paul --- Changes in v2: None drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 ++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index d019385..a5cb104 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -115,6 +115,7 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_framebuffer *old_fb) { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + struct exynos_drm_manager *manager = exynos_crtc->manager; struct drm_plane *plane = exynos_crtc->plane; unsigned int crtc_w; unsigned int crtc_h; @@ -129,6 +130,9 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, crtc_w = crtc->fb->width - x; crtc_h = crtc->fb->height - y; + if (manager->ops->mode_set) + manager->ops->mode_set(manager, &crtc->mode); + ret = exynos_plane_mode_set(plane, crtc, crtc->fb, 0, 0, crtc_w, crtc_h, x, y, crtc_w, crtc_h); if (ret) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index dc730e5..c58a4c7 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -184,6 +184,7 @@ struct exynos_drm_display { * @initialize: initializes the manager with drm_dev * @remove: cleans up the manager for removal * @dpms: control device power. + * @mode_set: set the given mode to the manager * @commit: set current hw specific display mode to hw. * @enable_vblank: specific driver callback for enabling vblank interrupt. * @disable_vblank: specific driver callback for disabling vblank interrupt. @@ -200,6 +201,8 @@ struct exynos_drm_manager_ops { struct drm_device *drm_dev, int pipe); void (*remove)(struct exynos_drm_manager *mgr); void (*dpms)(struct exynos_drm_manager *mgr, int mode); + void (*mode_set)(struct exynos_drm_manager *mgr, + const struct drm_display_mode *mode); void (*commit)(struct exynos_drm_manager *mgr); int (*enable_vblank)(struct exynos_drm_manager *mgr); void (*disable_vblank)(struct exynos_drm_manager *mgr);