From patchwork Thu Jan 11 16:54:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10158251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E6EC605BA for ; Thu, 11 Jan 2018 17:01:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 665F8288A1 for ; Thu, 11 Jan 2018 17:01:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64CA3288A3; Thu, 11 Jan 2018 17:01:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16FCA288D8 for ; Thu, 11 Jan 2018 17:01:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E331E6E7CC; Thu, 11 Jan 2018 17:01:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 37A856E7CC for ; Thu, 11 Jan 2018 17:01:05 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id h140so3575394lfg.1 for ; Thu, 11 Jan 2018 09:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:user-agent:date:to:to:to:to:cc:subject:mime-version :content-disposition; bh=f4gFHzUWUaVT4THTxbPDpt4A60Lw1ek8Jn0EwvjDSMw=; b=dAW56NLGIPPLk2/gtEP+m24PuqtIF2aG4DBHEZomU2/XaNA4EqIJj0+1lBPSPOqL2Q ERCEE7XDB4athj+DtrECK1YdFrG9FZjsauC2+XH8FpEcB01WfP7D7PzTLCkhMhdzCR1V Sfh2N2Mr4MNCMTD9mY0fgkwc5Vmwc2rl6aZU4SPmwPqpM38UaLQ/UJDDg2+f3HK/B24q CxaDyn0gdbBnA0MmBNxRYvcmOr+Z6omiqIiQ/DD/P7LQWhyR+8zpMSXJQK5PQFKbWX04 X8NbgYeS/ymzorC7sZ0AUco6QgNO9x1+fSmEywSLwG0mqC0utHEnDrlFp3/EeBv1NcUn tMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:user-agent:date:to:to:to:to:cc :subject:mime-version:content-disposition; bh=f4gFHzUWUaVT4THTxbPDpt4A60Lw1ek8Jn0EwvjDSMw=; b=K+8NXr8F2Z8zsJLGyuW709IPt76Wu1iY1l1y7B7LvK3P0VaFlBGX2tX3dm/mKSZyMV RyLBdnHObbuyp5Bmii8pihOXkHNKcqUVKdcRJothFN+RykClKJjXBDUbr8COVDuL6aeP KZLdFqhnca+l2zpSJV2rnUdmF3pXph8oYElUqULzR21HvxlZgC8dd7nth2zXhjFkn8rE dJJDcKiMVUMLpKsmIxo1CdNbo3k7jH9xoi3MRVhX7A5Sk3f2XM/5BhGnE9iiGRtzgR/0 nLMp2H4BoxBxNKnXWibrSqG6hx/7TsZcOmVRboF9/iJFfLUzgX1yLnQYDj1W98RzG+PY +zUQ== X-Gm-Message-State: AKwxyteowDXyVugZ74otEE5GEQ5vy89DgviD8btyVeKx2uOSinQblT6w hA27WOJJ2qviaMDuyqsqT21YWy7WOHg= X-Google-Smtp-Source: ACJfBotlpZ20wt98LlLjv7VzwK53QBzkDNtWrSiu7FcOzp1AGiy19rvBKdvvppyt5k76kf3+4VFZ2g== X-Received: by 10.25.72.150 with SMTP id v144mr1501384lfa.103.1515690063441; Thu, 11 Jan 2018 09:01:03 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.85.218]) by smtp.gmail.com with ESMTPSA id y15sm3953188lje.10.2018.01.11.09.01.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 09:01:02 -0800 (PST) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Thu, 11 Jan 2018 20:00:59 +0300 Message-Id: <20180111170059.858419764@cogentembedded.com> User-Agent: quilt/0.64 Date: Thu, 11 Jan 2018 19:54:34 +0300 To: Laurent Pinchart , David Airlie , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org To: Rob Herring To: Mark Rutland To: devicetree@vger.kernel.org Subject: [PATCH 2/3] drm: rcar-du: add model field to struct rcar_du_device_info MIME-Version: 1.0 Content-Disposition: inline; filename=drm-rcar-du-add-model-field-to-struct-rcar_du_device_info.patch Cc: Sergei Shtylyov X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP In order to add the R-Car V3M (R8A77970) support to the DU driver we'd need to keep track not only of the SoC generation but also of the exact model (for the LVDS encoder support). Therefore add the 'model' field to the 'struct rcar_du_device_info' and initialize it accordingly for the already supported SoCs. Signed-off-by: Sergei Shtylyov --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 9 +++++++++ drivers/gpu/drm/rcar-du/rcar_du_drv.h | 14 ++++++++++++++ 2 files changed, 23 insertions(+) Index: linux/drivers/gpu/drm/rcar-du/rcar_du_drv.c =================================================================== --- linux.orig/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ linux/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -37,6 +37,7 @@ static const struct rcar_du_device_info rzg1_du_r8a7743_info = { .gen = 2, + .model = R8A7743, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .num_crtcs = 2, @@ -58,6 +59,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rzg1_du_r8a7745_info = { .gen = 2, + .model = R8A7745, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .num_crtcs = 2, @@ -79,6 +81,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7779_info = { .gen = 2, + .model = R8A7779, .features = 0, .num_crtcs = 2, .routes = { @@ -100,6 +103,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7790_info = { .gen = 2, + .model = R8A7790, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .quirks = RCAR_DU_QUIRK_ALIGN_128B | RCAR_DU_QUIRK_LVDS_LANES, @@ -128,6 +132,7 @@ static const struct rcar_du_device_info /* M2-W (r8a7791) and M2-N (r8a7793) are identical */ static const struct rcar_du_device_info rcar_du_r8a7791_info = { .gen = 2, + .model = R8A7791, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .num_crtcs = 2, @@ -150,6 +155,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7792_info = { .gen = 2, + .model = R8A7792, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .num_crtcs = 2, @@ -169,6 +175,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7794_info = { .gen = 2, + .model = R8A7794, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS, .num_crtcs = 2, @@ -191,6 +198,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7795_info = { .gen = 3, + .model = R8A7795, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS | RCAR_DU_FEATURE_VSP1_SOURCE, @@ -223,6 +231,7 @@ static const struct rcar_du_device_info static const struct rcar_du_device_info rcar_du_r8a7796_info = { .gen = 3, + .model = R8A7796, .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_EXT_CTRL_REGS | RCAR_DU_FEATURE_VSP1_SOURCE, Index: linux/drivers/gpu/drm/rcar-du/rcar_du_drv.h =================================================================== --- linux.orig/drivers/gpu/drm/rcar-du/rcar_du_drv.h +++ linux/drivers/gpu/drm/rcar-du/rcar_du_drv.h @@ -49,9 +49,22 @@ struct rcar_du_output_routing { unsigned int port; }; +enum rcar_du_model { + R8A7743, + R8A7745, + R8A7779, + R8A7790, + R8A7791, + R8A7792, + R8A7794, + R8A7795, + R8A7796, +}; + /* * struct rcar_du_device_info - DU model-specific information * @gen: device generation (2 or 3) + * @model: device model * @features: device features (RCAR_DU_FEATURE_*) * @quirks: device quirks (RCAR_DU_QUIRK_*) * @num_crtcs: total number of CRTCs @@ -60,6 +73,7 @@ struct rcar_du_output_routing { */ struct rcar_du_device_info { unsigned int gen; + enum rcar_du_model model; unsigned int features; unsigned int quirks; unsigned int num_crtcs;