From patchwork Thu Jan 30 21:19:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3559421 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 F061BC02DC for ; Thu, 30 Jan 2014 21:22:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB05D201B9 for ; Thu, 30 Jan 2014 21:22:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9CDEA20173 for ; Thu, 30 Jan 2014 21:22:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 777A2C2BF8; Thu, 30 Jan 2014 13:22:40 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by gabe.freedesktop.org (Postfix) with ESMTP id C286546441 for ; Thu, 30 Jan 2014 13:20:37 -0800 (PST) Received: by mail-qa0-f47.google.com with SMTP id j5so5238422qaq.34 for ; Thu, 30 Jan 2014 13:20:37 -0800 (PST) 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=WR6/RM+rfRyokPVoDJvjiHNpAJYEQxfhKkjkSPHHV4o=; b=SL+Gz2Z+rVmT8DK4DYtvf+irFz4y1wKOLbdFM9oYIKHNIC1jO+0tGqXhnwafqd3NP/ S9Tvv37WVqxptv8Y9bV9jWfrPxqInjDU52KKY5PdX4fljkEdVuEeKfVarNQWtkxUW+Wq RjcbXXUXmH5sPIGCuaVy4q8sIu0bqvS6NpIks= 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=WR6/RM+rfRyokPVoDJvjiHNpAJYEQxfhKkjkSPHHV4o=; b=JhiJZ37fI6UzpRWMehOBYAM5K67leJxBnCCeCc8CBEbus0XUv7CVHSBwLbg1R1efpw P/6ca+wpTn+LC9Ru67fYLErH43PGv8jljuCDnnb7NE2RR3wwmodIP6jYhvvQw2fPHFGl heGyw9wX3W7bjR/JmXTvvyhg9Zziem0+h6Dds5QZs7wX8zgiQ7qRzuP3hSM5lV9JrXR0 I9bizLuEAw4AZ+pn5p6F6vNdtlz5pjkk2vlZH2wLaIfylhPljkwzkTBbGTmY8KArHhQQ DjB4oIYQmQgG4YQTkznVMc9rAJ7qgRitTt1Wo3Rj7+t26gWPwSmE5kaJBOO4Xh2kEqRh YFuw== X-Gm-Message-State: ALoCoQmV/BfTY6jZ/mKXyg5sna4BOGnj/szEtlfqExv61iAYZ/HrDhGBn/TANhZgD3OUjX/toFzG X-Received: by 10.224.104.8 with SMTP id m8mr25953615qao.87.1391116837299; Thu, 30 Jan 2014 13:20:37 -0800 (PST) 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 r13sm20673608qan.7.2014.01.30.13.20.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 13:20:36 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v4 29/34] drm/exynos: Add create_connector callback Date: Thu, 30 Jan 2014 16:19:28 -0500 Message-Id: <1391116773-28471-30-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1391116773-28471-1-git-send-email-seanpaul@chromium.org> References: <1391116773-28471-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.5 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 creates a new display hook called create_connector. The purpose is to allow the display driver to create its own drm_connector instead of using the exynos_drm_connector. This moves things closer to completely removing the exynos_drm_connector abstraction. Signed-off-by: Sean Paul --- Changes in v3: - Added to the patchset Changes in v4: None drivers/gpu/drm/exynos/exynos_drm_core.c | 3 +++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c index e76098d..1a60f5a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_core.c +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c @@ -87,6 +87,9 @@ static int exynos_drm_create_enc_conn(struct drm_device *dev, return 0; } + if (display->ops->create_connector) + return display->ops->create_connector(display, encoder); + /* * create and initialize a connector for this sub driver and * attach the encoder created above to the connector. diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index 09c158a..b1b02d0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -139,6 +139,8 @@ struct exynos_drm_display; struct exynos_drm_display_ops { int (*initialize)(struct exynos_drm_display *display, struct drm_device *drm_dev); + int (*create_connector)(struct exynos_drm_display *display, + struct drm_encoder *encoder); void (*remove)(struct exynos_drm_display *display); bool (*is_connected)(struct exynos_drm_display *display); void (*get_max_resol)(struct exynos_drm_display *display,