Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7093042rwp; Tue, 18 Jul 2023 09:56:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLDh+s+C8m/YBgG0bz3z9JD/WFiDW5zEve0WVoGtziuAH7IXRGWddoxwMhV5+aPXhxCaEW X-Received: by 2002:a05:6a20:3c86:b0:134:d4d3:f0a5 with SMTP id b6-20020a056a203c8600b00134d4d3f0a5mr8672922pzj.2.1689699379100; Tue, 18 Jul 2023 09:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689699379; cv=none; d=google.com; s=arc-20160816; b=g8P6/KgsDW6SVQHOtcM/X2W7gkpvloPDdqjVa0RYM5VfYh4AFzWuQ9UKTRJTIUbR/+ oC2gpayKDLK3+aOAZhijQ/R+yrqb7HKh1WEo2LEkAjyedBTVcjH1BYbKuhzv6rr00nnE VCwGIklTRuTPOqX5q1E7VXIVxFEZr0pzmORVr//9MvhhZ1PXi7UhE3a4977xUagXmiVy dFkZQmDb6Prxp5YQxqX43Ct2vyMXuKQl2t7FM59E6VzDExbaaZqdNa/0I/W9MNxpuZuf Ui2qUGaisQfyUGZ7GHrEF5rO9tjM+VZ70UxrJPZron/vusTfNVYTfu0zhtJDPUrtBDK+ CNJQ== 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=CARQM3SDGQPGCGFtBY+iJD1Tf291rgHbyxtWHh6YCr8=; fh=gKyZ8VeuxKEhvzfmp+KjHsnOWT6AxencVYc4su8bFyA=; b=irIqYZy0c0rY6X5kAKQktI94LrVRrhFUGJOM4si8nZ0P4WwBnE4TjzITwz+UwxLlBL r9x1DA3hjMnNXx25iiOUPB+VuPuqn8Sl0pZPg4Ce7tOOUasEoaPPncnqDP5XFR0QXyMN 2ZfxV82Sjagh0ntvssxxN/9CxJ9ahN9wZfcw63YbNXpZVhyvt6T5KKckMIOSbECbHx1o RhE0ct3TlvwhhFBswZq39g9NyUiz+iWivQMW94RKou23rId0550LOvdcIiTM+d81tcPQ Jf1H6vWvQ+sNXlwlMcEmchEiUp0j1hUki++N7OeATuJ3oDVip80x9Dv4YaU8nnGht8M0 NvZw== 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 o17-20020a056a0015d100b0068285516e43si1788022pfu.321.2023.07.18.09.56.06; Tue, 18 Jul 2023 09:56:19 -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 S231233AbjGRQzK (ORCPT + 99 others); Tue, 18 Jul 2023 12:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbjGRQy6 (ORCPT ); Tue, 18 Jul 2023 12:54:58 -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 4ABD519B0 for ; Tue, 18 Jul 2023 09:54:54 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5803:2d6d:5bbc:e252]) by laurent.telenet-ops.be with bizsmtp id Ngur2A00A0ucMBo01gurj9; Tue, 18 Jul 2023 18:54:53 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qLnyD-001nYw-FH; Tue, 18 Jul 2023 18:54:51 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qLnyN-000gcw-GS; Tue, 18 Jul 2023 18:54:51 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Geert Uytterhoeven Subject: [PATCH v2 23/41] drm: renesas: shmobile: Use struct videomode in platform data Date: Tue, 18 Jul 2023 18:54:28 +0200 Message-Id: <8b9676b675bcae39311421b7da8dc3e37fa5f0b8.1689698048.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=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 --- 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