From patchwork Wed Nov 15 15:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13456940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3781DC2BB3F for ; Wed, 15 Nov 2023 15:26:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82FCF10E059; Wed, 15 Nov 2023 15:26:55 +0000 (UTC) Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8796910E059 for ; Wed, 15 Nov 2023 15:26:53 +0000 (UTC) Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6d645cfd238so3260880a34.2 for ; Wed, 15 Nov 2023 07:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700062012; x=1700666812; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VHLM8GEK5kIF6P/tIjxS+4ZYxDZU/v7DZUKMk83fj/Y=; b=dH04FofP88PHs2LAH7j2oSOI/tS+yP0UAAcIKLIjbB7lRFtYMLBvsQjd1rRil9iP+P NUtn/8xK6Q6GCuet3QoihYTv6hCrKATM1Z1xhb9lusOsUXix4rI4mtBlOXMFOpBSDnoe JHQE6IdF/ScfLRmi5cA7+920UXq7IlZ4Xv0ZQ/Dt6zd1tUP9LptOr19LkB9hcS5WzUhu 1o7jGRksMVd++Ecag97fKpQZaAlmrQP7zH4ioL0kBMelWmrkl0KyXcBTQCgcAJ3OARtx 7yuLyDHkpn0r01Lo4qCnXILSOWZtwIi3puJl4DIX9xtvFE4njsSGIMSGXnXwg0rrmFB7 A32g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700062012; x=1700666812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VHLM8GEK5kIF6P/tIjxS+4ZYxDZU/v7DZUKMk83fj/Y=; b=CG6fKy3JuPfw15pSA/W2tuLf6Nyztj1MV4qsLlykF47wn71Yz+j1hY9d7+ppfkq8bP x/8xzJP4VGgF42Ug4+CEMcOHFcU4lpwsOTugauBRZ+TL3x0JuXatb5GDwHpNgkQCMZL1 ZCQ8kDXhMQZj2ppjUn/15SCdr+Meln/iZt5tHzCDZQg00JK8NayeTWCdm9BbVyPv2sYE 6eCcUbH4NK0PRdrONsgUuGF1YY8JVaOTt++Yt1CdSIFxzE9HzSfu+TbBqXwfSn3FGC7+ nu9lJvZwGMDQvQRKPJjZK/4A/Dy5qhpwt/IeC4Klpiu9B6lWdVKyMyQ3PYPBhgXc5coL VIDA== X-Gm-Message-State: AOJu0YzqahZYAiaCzsy/68KXmPQCFXhpb/Edq0TuvqWRJmY28r2wMueD bAOeAcd7Ojw0lSHPPAldK+yMEHKZj+w= X-Google-Smtp-Source: AGHT+IFthqHpMg+jjz96IAmQF/JvQXkQw7lmW/dVlNuUTv1Jpfb9kQtXB7F4zfGEpeWPGyKGUCeGtw== X-Received: by 2002:a9d:6741:0:b0:6d6:3fca:db0c with SMTP id w1-20020a9d6741000000b006d63fcadb0cmr6481043otm.18.1700062012623; Wed, 15 Nov 2023 07:26:52 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id a18-20020a056830101200b006cdf9935af2sm398012otp.53.2023.11.15.07.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:26:52 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/panel-elida-kd35t133: trival: update panel size from 5.5 to 3.5 Date: Wed, 15 Nov 2023 09:26:44 -0600 Message-Id: <20231115152647.2303283-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115152647.2303283-1-macroalpha82@gmail.com> References: <20231115152647.2303283-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_jesszhan@quicinc.com, sam@ravnborg.org, Chris Morgan , neil.armstrong@linaro.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan The comments at the top of the driver state the panel size incorrectly as 5.5" instead of 3.5". Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index e7be15b68102..6cd8536c09ff 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Elida kd35t133 5.5" MIPI-DSI panel driver + * Elida kd35t133 3.5" MIPI-DSI panel driver * Copyright (C) 2020 Theobroma Systems Design und Consulting GmbH * * based on From patchwork Wed Nov 15 15:26:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13456943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9086EC54FB9 for ; Wed, 15 Nov 2023 15:27:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18C5010E060; Wed, 15 Nov 2023 15:27:03 +0000 (UTC) Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3806D10E059 for ; Wed, 15 Nov 2023 15:26:54 +0000 (UTC) Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-581ed744114so3168650eaf.0 for ; Wed, 15 Nov 2023 07:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700062013; x=1700666813; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KZGFsZil0baYKKqeLGbbmIrruY0ps4D1rKYDPh+vV2g=; b=NVLj7FOQxbHfJ1n6sCQpxdiL6KOos9xSrAjpuQUbN2SXTXWCWImPDFSxw4g6H2tqbp nvgj1HZfEFrORYXsD9qBKoeV0oa4xKT+UrMPT+R3o37CiMF7y9fbvlEpaCAUhVfpbOYN a0/1nHZHJGtmMM58LooqPO396x6EcQ6xcKugJfHFvJ3jWyzaw18snKO90XnNODWOfspq RgQ6thdO0biNsRl6dEliZfIChAeTZ/r5W8yJh+nANWi8pVDPXSf2alvJlAXaG5bOdYmT 2kS/5yFP27npALbrXGlz83734oXnicd4NP57ez0kKkuvAgbfnW9C0a+ZECTCXAXy29Vl YCBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700062013; x=1700666813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KZGFsZil0baYKKqeLGbbmIrruY0ps4D1rKYDPh+vV2g=; b=GT6uqywWEJ7Y0nnzP6s6KLVJ8Y6K2qnwPhWDe01J6FII6Vxrl4GYaEbwjIaA81KgL6 2EFYEQuPhRNwmeNRUstfr8leDo68p7Er2vR72ClbNvK973g8kM+viMDZHmpKjmyiGfKT SUv8cyuXAonEJAm0Aa9tM7a49sLRISErVaw5UTvy9t0GfF9swNGSnBpCQP6+0/Z5e36u tiRbnlyCbnPdfQ1YqD7YdvR/iGu7KiEuoEjuuYt4GtCVcEvXnb8R0v8HIFUfvTv5MnrJ pxzvBdu69QQIVMu4F2imw+cR0p0WNdY5MqdgeiiIM5NVk8fTh8vOV4PzNXWxrZWLuGO5 Lraw== X-Gm-Message-State: AOJu0YyK6GKZLRzfZ5aKBtj4svP5tXopnoNxweIJLf4W7voYXBPB51Rj NznUQTkyFArpUC6ClKuQzyvhlnMirhM= X-Google-Smtp-Source: AGHT+IHYrxG2w1/cHskJG3vTQP4FMyX6nm01gaV4IGT/y9/Nm4/afRw3q1CqHTi2fBEJPEQhVv9eYA== X-Received: by 2002:a4a:7505:0:b0:581:d5a6:da4a with SMTP id j5-20020a4a7505000000b00581d5a6da4amr10251799ooc.1.1700062013294; Wed, 15 Nov 2023 07:26:53 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id a18-20020a056830101200b006cdf9935af2sm398012otp.53.2023.11.15.07.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:26:52 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/4] drm/panel-elida-kd35t133: hold panel in reset for unprepare Date: Wed, 15 Nov 2023 09:26:45 -0600 Message-Id: <20231115152647.2303283-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115152647.2303283-1-macroalpha82@gmail.com> References: <20231115152647.2303283-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_jesszhan@quicinc.com, sam@ravnborg.org, Chris Morgan , neil.armstrong@linaro.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan For devices like the Anbernic RG351M and RG351P the panel is wired to an always on regulator. When the device suspends and wakes up, there are some slight artifacts on the screen that go away over time. If instead we hold the panel in reset status after it is unprepared, this does not happen. Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index 6cd8536c09ff..f1fc4a26f447 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -104,6 +104,8 @@ static int kd35t133_unprepare(struct drm_panel *panel) return ret; } + gpiod_set_value_cansleep(ctx->reset_gpio, 1); + regulator_disable(ctx->iovcc); regulator_disable(ctx->vdd); From patchwork Wed Nov 15 15:26:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13456942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E35FC2BB3F for ; Wed, 15 Nov 2023 15:27:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1298310E05B; Wed, 15 Nov 2023 15:27:00 +0000 (UTC) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB99810E059 for ; Wed, 15 Nov 2023 15:26:54 +0000 (UTC) Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6ce2c71c61fso3753976a34.1 for ; Wed, 15 Nov 2023 07:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700062014; x=1700666814; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R1HJYXNya0VUmq+cPipu8J3xs7ouSTliH+WFcewq36Q=; b=jqs3j821G2BHs1vbM1S3iRj/q0ZaurFHUd1f8CvEatlWY5Mu5ya0xWSjV4Mf8EDg1H G1djHE1guBMTlGZ/YOwYLx3HmGvt049QFQWi4gBSr/OrweXRF85LBl3euv+M7QWMvYyG /gEP2vvhvLD2m7o5/SWzDxgTTlr3rphO+g83YUSkjXkwHporLaEbG5qUEe0cjbJKj/gc 6PtTadOtVBrKeWyc9xyo93AnK5Ir2VtNy7PHt8thwzsKhjLCUtETSgrdUutRNleXQm3w jZlM5qrf1yFym3v0LGqEtJyIBUb8CG2qqXZXuLkpU6XPpVzXbiCwhm5L75tAenMFoVef mGgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700062014; x=1700666814; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R1HJYXNya0VUmq+cPipu8J3xs7ouSTliH+WFcewq36Q=; b=w1CttMjf33ybZo6lLcqjHQDuQbpdb+Mf8Te9J1IJOCVx3BItGB43nLvxpbfTBaD6B3 UxkyPeS8ZYV3eHglmBZZ2zNbH+4edu9VaNJ9XpIuta59VPgi+5P9D/3dxyNCg0Wa25aA hLLhFhGXIZjXwpxaTNKNE7oG611Uv5/NsU2cGWmE1ft68oOF/avsPOCPOj03uN7No18A qi0jHyTJLT4G/DjMcNk95EnZfB00WUUyVw7FyIZFU33xdVSSWPd9l9KRykEjDX/+1giq Xf9kk45esu+fE3+njocBARxO+a2MF4xMYKvtz4yjagBK0EeH0dxSjortRahAkF/GNWwh T3Dw== X-Gm-Message-State: AOJu0YywrRZ0RV1fxNPjqFJSG7VmPFRmOfZL2IKSAqiRMLE3NXUQBzYK u1HQKovvImQCwgkXJ4xLRgXQ9ZKPTd0= X-Google-Smtp-Source: AGHT+IHm9JSBiHjWboei5Jl8iT2kiDQoCe+OliwJULEwxFa6wMDUvT+KPjxEo6WeCthq1WyTLHWwYg== X-Received: by 2002:a05:6830:2056:b0:6d6:4d74:8450 with SMTP id f22-20020a056830205600b006d64d748450mr5524611otp.25.1700062013916; Wed, 15 Nov 2023 07:26:53 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id a18-20020a056830101200b006cdf9935af2sm398012otp.53.2023.11.15.07.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:26:53 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/4] drm/panel-elida-kd35t133: drop drm_connector_set_orientation_from_panel Date: Wed, 15 Nov 2023 09:26:46 -0600 Message-Id: <20231115152647.2303283-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115152647.2303283-1-macroalpha82@gmail.com> References: <20231115152647.2303283-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_jesszhan@quicinc.com, sam@ravnborg.org, Chris Morgan , neil.armstrong@linaro.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan Stop calling drm_connector_set_orientation_from_panel() as its now called by the panel bridge directly when it is initialized. Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index f1fc4a26f447..29b4ee63d83b 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -211,11 +211,6 @@ static int kd35t133_get_modes(struct drm_panel *panel, connector->display_info.width_mm = mode->width_mm; connector->display_info.height_mm = mode->height_mm; drm_mode_probed_add(connector, mode); - /* - * TODO: Remove once all drm drivers call - * drm_connector_set_orientation_from_panel() - */ - drm_connector_set_panel_orientation(connector, ctx->orientation); return 1; } From patchwork Wed Nov 15 15:26:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13456944 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B742C2BB3F for ; Wed, 15 Nov 2023 15:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61F0510E061; Wed, 15 Nov 2023 15:27:07 +0000 (UTC) Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E5BF10E05A for ; Wed, 15 Nov 2023 15:26:55 +0000 (UTC) Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6ce2fc858feso3745021a34.3 for ; Wed, 15 Nov 2023 07:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700062014; x=1700666814; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sdzIi85lCxQo8zOJTi1gIMrIE4uzV/IjMdOXWzWwuNQ=; b=D+2OcIminTlAcQBrPNp+dbuYWwC2ISdUa6DsaDJx5xY9+eb0OocAx8RRNZ6C7J2I0G RltB5IfWASmci+aKEGFp0Hjy4Rs7Z82ahn2Y5ZuLdFNQEW0WtG7MdS2QfnSmqN0PsNXz YoqMcSMr25mefXEq8WH21Abx5DeCtJQtIFehOkj2ijyAnMeIV9QDseh6KEqPr9TgtibK S/STTUwaiZnw4JG0IamM9sSvi6UVZQclM0jtezu3tAz3aJnv9namh/RE5V/VeMvg1ulc 028SR647KvlUYGNeS87JLnZxjdBSUR7UB30lJIE/tUM1I5ZvFsr0P0q35QQGZj2aroz6 IPAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700062014; x=1700666814; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sdzIi85lCxQo8zOJTi1gIMrIE4uzV/IjMdOXWzWwuNQ=; b=lW5KkI+0pCMpRxQ0PPpzFlePlRNC/1r1R4X90JTrPA7xsihG9nVgKs9yxfKK9c60Ce PkbDXjxWw94iv1x1AlBAUICb5As9U9Ur1JY6Ek5iJ/idqPmJAhXxEkxtyDXZzEwIqh1t aHmai/tvzgvis7Zz0lATdShUZ1/tIiUB51YAqqavLXqZrdecypaO9lWSBoN9om3Jb1z2 SrbhMMK8VONXjlhfMfSnLRZCPiCRcb8ZOctUbfYLtK5K5E7OKk1k5lhBEuHOCCNdOqVW n4Noor1C2aK6Xx5Q9fjvGCc+YKSygVnZAeXYFlNg2I/8fD9nGi500WHo0xsbwTcWsjuO hFVQ== X-Gm-Message-State: AOJu0Yw0vDZlt6UVWDRPBfyoHrcVSL8Y/3LxomfJNZ0/h+8CiHzia1EA WAzs1NXd5ONaLdFbh+neXQKVwu8q54M= X-Google-Smtp-Source: AGHT+IG6PJK8yUBG7tZHa9H4CJQYGMNGTPJjmHQ7ZdLr0Xh7U5DT9OvCe314f8L9dXM0ZygzxDOVVQ== X-Received: by 2002:a05:6830:1303:b0:6b8:7d12:423d with SMTP id p3-20020a056830130300b006b87d12423dmr5887402otq.18.1700062014508; Wed, 15 Nov 2023 07:26:54 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id a18-20020a056830101200b006cdf9935af2sm398012otp.53.2023.11.15.07.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 07:26:54 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/4] drm/panel-elida-kd35t133: Drop prepare/unprepare logic Date: Wed, 15 Nov 2023 09:26:47 -0600 Message-Id: <20231115152647.2303283-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115152647.2303283-1-macroalpha82@gmail.com> References: <20231115152647.2303283-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_jesszhan@quicinc.com, sam@ravnborg.org, Chris Morgan , neil.armstrong@linaro.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan Drop the prepare/unprepare logic, as this is now tracked elsewhere. Additionally, the driver shutdown is also duplicate as it calls drm_unprepare and drm_disable which are called anyway when associated drivers are shutdown/removed. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 28 -------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index 29b4ee63d83b..00791ea81e90 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -43,7 +43,6 @@ struct kd35t133 { struct regulator *vdd; struct regulator *iovcc; enum drm_panel_orientation orientation; - bool prepared; }; static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel) @@ -91,9 +90,6 @@ static int kd35t133_unprepare(struct drm_panel *panel) struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); int ret; - if (!ctx->prepared) - return 0; - ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) dev_err(ctx->dev, "failed to set display off: %d\n", ret); @@ -109,8 +105,6 @@ static int kd35t133_unprepare(struct drm_panel *panel) regulator_disable(ctx->iovcc); regulator_disable(ctx->vdd); - ctx->prepared = false; - return 0; } @@ -120,9 +114,6 @@ static int kd35t133_prepare(struct drm_panel *panel) struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); int ret; - if (ctx->prepared) - return 0; - dev_dbg(ctx->dev, "Resetting the panel\n"); ret = regulator_enable(ctx->vdd); if (ret < 0) { @@ -166,8 +157,6 @@ static int kd35t133_prepare(struct drm_panel *panel) msleep(50); - ctx->prepared = true; - return 0; disable_iovcc: @@ -296,27 +285,11 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) return 0; } -static void kd35t133_shutdown(struct mipi_dsi_device *dsi) -{ - struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = drm_panel_unprepare(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); - - ret = drm_panel_disable(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); -} - static void kd35t133_remove(struct mipi_dsi_device *dsi) { struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); int ret; - kd35t133_shutdown(dsi); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); @@ -337,7 +310,6 @@ static struct mipi_dsi_driver kd35t133_driver = { }, .probe = kd35t133_probe, .remove = kd35t133_remove, - .shutdown = kd35t133_shutdown, }; module_mipi_dsi_driver(kd35t133_driver);