Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp1729680rdb; Wed, 16 Aug 2023 23:33:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEKh628hg6P7yEOgr7012QusqFEHRiND34mD7Nj6irG9lczklFDTsvXoOMOEWjqHcxhlbz X-Received: by 2002:a05:6808:2199:b0:3a4:225d:8135 with SMTP id be25-20020a056808219900b003a4225d8135mr5725483oib.31.1692254032896; Wed, 16 Aug 2023 23:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692254032; cv=none; d=google.com; s=arc-20160816; b=mV1i52Syw96W2XclsvGk8MJ8UX89V41sGlz49raTt37+cbqRYwJwL/Jw8jHwrR8K5Z NfOwlMiYAT9PlXI9bKW0K8ACIC2zf0XYMIGryT63noGdhBtpE9gSdwMv+abpsIr4UvQf 3wovHh0ScirYoju3ZCR6YmsQDf3HYchvdJiBKkuwzJKXBboI/etH3r2E+IvA/8S+IT3i q8KbI9Fro8mFqJs1ypQeNe+VoYpfAbBqKnWGHMcSNgsLfqTaj9lfV97FOumcjQv1Zluj azJfT8P4m4LH/8EBF4mh66waw1NARnICTL/GVdbTRdfsaEhJeR9fmfXfXHjqvG6DdH6Y eqkA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l189-20020a6388c6000000b00565e46eda2fsi3635644pgd.658.2023.08.16.23.33.30; Wed, 16 Aug 2023 23:33:52 -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 S244030AbjHPKpm (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 Content-Transfer-Encoding: 8bit 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 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