From patchwork Tue Oct 29 16:13:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 3109271 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CF6159F2B7 for ; Tue, 29 Oct 2013 16:20:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3571820304 for ; Tue, 29 Oct 2013 16:20:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8C427200F4 for ; Tue, 29 Oct 2013 16:20:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 891CAEECFA; Tue, 29 Oct 2013 09:16:43 -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 52254EEC0C for ; Tue, 29 Oct 2013 09:14:13 -0700 (PDT) Received: by mail-qe0-f42.google.com with SMTP id gc15so47613qeb.15 for ; Tue, 29 Oct 2013 09:14:13 -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=R/C8OnTKC4O3UCEnLEPdt6FMvkN0j0mgXaYhafPaF7k=; b=Kg0HcnD8t9pNN6k9SKgqve2asltIBOfVMjn1UV8VgA0+e+kurrTOE4MKxEeeWSr9wd VBAIRV5MEY4PvXT19MMMYhvU2/SPEMkvbACqDDgLZ6AHRLPPB+bM09poeat8BEzJfdsK FWTWq3Wh6PixxhGdG+a8XsmJTJfXo+SSoLEGo= 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=R/C8OnTKC4O3UCEnLEPdt6FMvkN0j0mgXaYhafPaF7k=; b=C7E0CVdhfxempOW2DKLM/OeYGC5x9lSTDiVTql0TueOimDoZCBh4a21E7hnbEVVUfh lgAErLkKKyOmNMqGbCIEDrbSGhkGsYsjVkOLJW533XE/BDssNlhij51QrYjvUW0IqDtx FpKrd/yUYPmMs3ZkL5YbAvjAQBtDUNdV5PwGFz/jcaFYWmNY32O8DOXyLTH/ncOLxoG9 HguHF8cYRSwNlg/3IPOB8ZKeJuxoMk8uKpqFzxx05qYkqdwiPR8NUGIvDPE4JqqzRSGj LgmmbZchJNSfHTMfW1B5tPlROFWbx8D1TYg5Q2QG3kZ8c0cqpdXf3RyYVGuTBgIoQ7+D uIBg== X-Gm-Message-State: ALoCoQl2TDuRwjiGbClM2kRvbjyqrnvYKhTOsH2eQKVi74vLgiwks0gO2gkWTCoZnWlPxOqu4gPE X-Received: by 10.49.58.225 with SMTP id u1mr390954qeq.55.1383063252922; Tue, 29 Oct 2013 09:14:12 -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.14.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 09:14:12 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v3 27/32] drm/exynos: Add create_connector callback Date: Tue, 29 Oct 2013 12:13:13 -0400 Message-Id: <1383063198-10526-28-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 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 Reviewed-by: Tomasz Figa --- Changes in v2: None Changes in v3: - Added to the patchset 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 f3e18d1..db6a3b2 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,