From patchwork Wed Aug 16 09:50:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 135797 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp147150vqi; Wed, 16 Aug 2023 09:50:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHaG2EQnoXTdZaIoPhh0+3GBNzEbF0SK5PrSt2wL9OrakCUnIlTnRP1or5fl0wjUE94avNz X-Received: by 2002:a17:906:641:b0:99c:1dac:5af0 with SMTP id t1-20020a170906064100b0099c1dac5af0mr1629040ejb.70.1692204600078; Wed, 16 Aug 2023 09:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692204600; cv=none; d=google.com; s=arc-20160816; b=WyLlj/LBJb04jO5dqAiNu5RZtWg0rAP9PgdfawT+UITWtOtRWWLLKYLwOUr0FVZkoj U0N8KAlf0q8n0tu1gQqgk7EDvfMQ1EIuZ6TmIR4iB34UjBEIJuermR5EH2zRKWLJRKvF 4RAXyuGXw/iezCw9KBUWBO53RiCEcCEDGjcFdqzUoa1Qxy3sUrYe+VHcIL0HfwUDcG7y BwdaXlHhr4xokP7nL7cBD5qHI6HfywQDYU4al6YYZGN/WnENHxDOTaPFHeW34nHWaRRn UwJfiG7pEyoJzArCUGLD1O3BQB58ha0j5OfXO+FcUUoGbb8CdBPU3/KrfByBewOWofyy hx/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JYGa2f/39m5RMc32cgiHmxNwGvcW7gbuMoCNSFbHuC8=; fh=+jvQ0EMdJDEpBSBJ/RHxUHzd0rDPfCMryno/elbwKeU=; b=tnSKmtRCNmEs3uwqRZj4Xjx6GCM2r4fWWoOd+zk8LilwnM7MzJ75UJv2Ygm2q/+tIM Xe9EJJtRlvmLbVhlU5izF/ujem7UANE72WeVbuJzrw8wCW1hUZuP2PHeTve/eS5Bl1I1 U1pBaAEJx6ARCvgEhPMTEmeMlF8EpFNt3z4CWJVbZcEYD1+P1Txxixl5TMqQc82IU6TC 23F5TmkN0tjRcIwb1uY3yGadatjMIJdZifyXQCxSRX9YMF2ezqvc8mH0LIHlF6rLtKwO 7IA5nbwM6VYeI77ZTMpnpwv3QDlNj/aLABOR4cp8e2KT5LQGEZZWhAC+AD2WdTsbgkks gp/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170906838500b009655fcff588si11437531ejx.835.2023.08.16.09.49.36; Wed, 16 Aug 2023 09:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244031AbjHPKpm (ORCPT + 99 others); Wed, 16 Aug 2023 06:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243948AbjHPKpE (ORCPT ); Wed, 16 Aug 2023 06:45:04 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFBF22729 for ; Wed, 16 Aug 2023 03:44:43 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5d0c:f209:12a7:4ce5]) by laurent.telenet-ops.be with bizsmtp id aAkg2A00h45ualL01AkhV4; Wed, 16 Aug 2023 12:44:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qWE0w-000os3-GI; Wed, 16 Aug 2023 12:44:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qWDAw-00675w-Qt; Wed, 16 Aug 2023 11:50:50 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Geert Uytterhoeven Subject: [PATCH v3 23/41] drm: renesas: shmobile: Use struct videomode in platform data Date: Wed, 16 Aug 2023 11:50:30 +0200 Message-Id: <2d07ea074f37caa3714a75d24b991c647539b18f.1692178020.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774405130947669792 X-GMAIL-MSGID: 1774405130947669792 From: Laurent Pinchart Replace the drm_mode_modeinfo field with videomode that includes more signal polarity flags. This simplifies driver handling of panel modes and prepares for DT support. Signed-off-by: Laurent Pinchart [geert: Simplify] Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by, - Select VIDEOMODE_HELPERS. Changes compared to Laurent's original: - Rebase, - Fix build, - Remove unneeded {width,height}_mm intermediaries from shmob_drm_connector, - Replace embedded videomode by a const pointer to pdata. --- drivers/gpu/drm/renesas/shmobile/Kconfig | 1 + .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 35 ++++++++----------- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 3 ++ include/linux/platform_data/shmob_drm.h | 11 ++---- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/Kconfig b/drivers/gpu/drm/renesas/shmobile/Kconfig index ba941587ca70e08c..027220b8fe1c5fbd 100644 --- a/drivers/gpu/drm/renesas/shmobile/Kconfig +++ b/drivers/gpu/drm/renesas/shmobile/Kconfig @@ -6,6 +6,7 @@ config DRM_SHMOBILE select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER + select VIDEOMODE_HELPERS help Choose this option if you have an SH Mobile chipset. If M is selected the module will be called shmob-drm. diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c index f62ae047a48f615b..b3ef10b7828de197 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c @@ -23,6 +23,8 @@ #include #include +#include