From patchwork Tue Jul 18 16:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 122134 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1880432vqt; Tue, 18 Jul 2023 09:56:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEEhiBavk7JqJc2g/t8zqw40OA6lP/YmRmsAWd2+xZLqTu7gtKTfpIWEXDfO0ALr33mXUh6 X-Received: by 2002:a05:6a20:7495:b0:132:d029:e2d7 with SMTP id p21-20020a056a20749500b00132d029e2d7mr14477352pzd.55.1689699377734; Tue, 18 Jul 2023 09:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689699377; cv=none; d=google.com; s=arc-20160816; b=t3E9kSeSHYc2eLgIeVjCHhXgzLZYLKOZlQomEgiWczsrplrySSMZBaskSL7xteNubb TLRYQIGOlDfU/6sMzJzPQ3xqKAsrDhF/Pb9eFfFN9Utmt6abxXQTw9WZo+WNvTw3jA2M ylkYeRcuf8BMHKZ9rw1s+VuhVy0t3KdOua1oAoKrwoOO7nyx5thn7xv/xmoERm33B7fo DJnJJ2nxI6tKcrS5lPky0tO7263MG0OM9G4Nt7s0w+vJsOhsTU9kkxVItLHxoNLiIgaE GXqVi6YnROyzLxtSSWBEaiYu81wSBHMfUdA/PaIWYsh5XHG1ooRMBlLnrv38fZumolri 7Tyg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j27-20020a633c1b000000b00553b9b18878si1825705pga.454.2023.07.18.09.56.04; Tue, 18 Jul 2023 09:56:17 -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 S233176AbjGRQzL (ORCPT + 99 others); Tue, 18 Jul 2023 12:55:11 -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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771778214791927254 X-GMAIL-MSGID: 1771778214791927254 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