From patchwork Tue Oct 29 16:13:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3109311 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 3DDC4BF924 for ; Tue, 29 Oct 2013 16:21:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86A8A20384 for ; Tue, 29 Oct 2013 16:20:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5BC562037A for ; Tue, 29 Oct 2013 16:20:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37FB7EED24; Tue, 29 Oct 2013 09:20:24 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f42.google.com (mail-qe0-f42.google.com [209.85.128.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 35BCBEEBBB for ; Tue, 29 Oct 2013 09:14:01 -0700 (PDT) Received: by mail-qe0-f42.google.com with SMTP id gc15so50926qeb.1 for ; Tue, 29 Oct 2013 09:14:00 -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=BhXruI1ZN9n0cypcGcBESpTppJb8OIXkfqxg953Qo2g=; b=f32SPVo2woBvoC5ggz9eGG55ZBzAe3OUGr4VPzuUYkJSxW+/hWTbjlEoOZQzXyiw7B y0+grnCljTSaUiVQThVV7UPCJbXRwbHJcbM27z4pB+6OmE1g8B7/eJzEbGoTMrF9gpQg Fpom1D18/e68CTqW3BHAVQuk0f3xb0g6rlgeM= 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=BhXruI1ZN9n0cypcGcBESpTppJb8OIXkfqxg953Qo2g=; b=RiPK6mbdra8OGmgQcsc5hzYclVq6X/hHq8wxE/coakglKp0GQefDS2SVkMq6zjvYVg 77W8eUiXfuRz9HdfH9RJAisn6lqIG/lpDTaCnE5Ye8e3WmI9xdkNLdOwX/q50q1JCWS7 dFr47uXPnKbNVVAdH2LJ6wI6MKq90SpAGEQ6O58eqGplv/bG71iDcTOD8aBSJzuvVIS4 dIoT3Z5u0i3QbwPJvMK0YpEI3jibGatAOHd0YTK3a0AfmsOvG6MCtSy6TyuiJGQteiuU oKU7gPL5Tqejx9gv8VxAIt6XCXThyd/GhWsR4m06ynJkBj+3AIu617y0x+ugHVX6eE5/ podw== X-Gm-Message-State: ALoCoQnlMnIJPcb3z9+vdYfknZXPFaGEbFHYNRhoJ6eBgeFUv3259K7/bE7TyEgK96e3AEZ4tHpE X-Received: by 10.49.116.19 with SMTP id js19mr666394qeb.34.1383063240822; Tue, 29 Oct 2013 09:14:00 -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 h9sm66581946qaq.9.2013.10.29.09.13.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 09:14:00 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v3 17/32] drm/exynos: Add mode_set manager operation Date: Tue, 29 Oct 2013 12:13:03 -0400 Message-Id: <1383063198-10526-18-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1383063198-10526-1-git-send-email-seanpaul@chromium.org> References: <1383063198-10526-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@lists.freedesktop.org Errors-To: dri-devel-bounces@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 Changes in v3: 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);