From patchwork Fri Nov 17 19:44:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13459231 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 8BDA8C54FB9 for ; Fri, 17 Nov 2023 19:44:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4B5D10E770; Fri, 17 Nov 2023 19:44:31 +0000 (UTC) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5164A10E08F for ; Fri, 17 Nov 2023 19:44:13 +0000 (UTC) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3b3f6dd612cso1414794b6e.3 for ; Fri, 17 Nov 2023 11:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700250252; x=1700855052; 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=IRwe6F5agEZPsW1zo8c/XoE7+M6ec22ODd0/7JLQ2D4=; b=Vi2yXSn6SVhGL5oqLtkUKAeb+6oqHFiW5sH4+WEpf5G7xA/RyADptuIinuo7tNhKZK HbGlRJ8ABQWRrSTiv0cILd8YvVlFVCpmycWBlPZceaXhKqJQTxblqKpSgBuWjayfxj1I uMXZRkNBNb/xekff6XVxJeltf7pPbjL/Hon9gb+tciDRh7nsihfE6FvMmpgiInauQRvk 4cwW3sTNbEaiDcdrcAADCub7rznm0fsD6/Lx7hunQz/NHVLMskfihgVDmlKi6gi1e45o bhRHyIkxB5w1Cc3b174qqhp0dpCOcddmBmou3ppiLHb7BVRZ5XOtWvN8lK2ZJXpkgzmN gA6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700250252; x=1700855052; 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=IRwe6F5agEZPsW1zo8c/XoE7+M6ec22ODd0/7JLQ2D4=; b=Ef6BswPgP53vhfLo0RSbdU4bp54W9K1ZQSuCJgpwAon2R/dhXGkBYUGkN7iFXMvlwe RWMIj/NBnMYROk9nwoklinAOq198rRTOuC9Z5y99TAHtqrkFvbjYK1lh+Mqb9xFZMAts xpF1Y/kl2QCXTHwLMq22XNv5+cMijrrmL2yGj+AAXV+BH05iwNTRyja5kDSUksO5hN/2 vuQPKVu9okkPWdSJs1YTHC58y5+AjrEo3oeZoqWMJIo+8ZcKeMD9qFbI8l+79RH18iHl 17CY2zZJdXnzDfpbLrveqclg24xrmTcnklZ+YmTrL5b2nigeRs0fuJOGd3w6ccEjI8Cs o+1w== X-Gm-Message-State: AOJu0YwXNlcaQEmWZl473xYvHzAnvuycE3wOM/peXhBvo0OefaN8wUAr OcdIhjO+2M7uAYRq9kKIyKh5xQp7YWA= X-Google-Smtp-Source: AGHT+IHWfot5lAXZHdF+K5EC6ChPXjzkCaXC/lxQ86+JpJxUWa5/UAicUxnquPdjnDuzXlvbaNMqJA== X-Received: by 2002:aca:1005:0:b0:3b3:e64e:e0a4 with SMTP id 5-20020aca1005000000b003b3e64ee0a4mr363776oiq.54.1700250250893; Fri, 17 Nov 2023 11:44:10 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id y5-20020a056830108500b006cd099bb052sm338193oto.1.2023.11.17.11.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:44:10 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 1/5] drm/panel-elida-kd35t133: trival: update panel size from 5.5 to 3.5 Date: Fri, 17 Nov 2023 13:44:01 -0600 Message-Id: <20231117194405.1386265-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231117194405.1386265-1-macroalpha82@gmail.com> References: <20231117194405.1386265-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 Fri Nov 17 19:44:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13459229 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 8BC3AC54FB9 for ; Fri, 17 Nov 2023 19:44:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B858210E76E; Fri, 17 Nov 2023 19:44:23 +0000 (UTC) Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5944510E08F for ; Fri, 17 Nov 2023 19:44:12 +0000 (UTC) Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1efa01323b4so1289647fac.3 for ; Fri, 17 Nov 2023 11:44:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700250251; x=1700855051; 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=9l9Un6Vq4BKwmZrHqY5GaENjD6mCXDItjRLg6fRH528=; b=TiOe9kKlNK1F4jXpp7OljyGKuTMRes4teS78BdvQoHSj7OguDIHJOArKq/NAR9wLfa npEhIK0UOJnfH0KTMnm3Wv/swLou5xiUQbtmf2afS2NSMdS2yVII45n/9KjOwqRD0UPc GZmnpHVlvYEz3L6cToGmQmirb6fP+OOL3kRjBlefV3KqZnN23twRnxsCpyIalsjXPqi6 2UvggXauHYtvfZUSik2SwMvwyCjdO4UaoqNzwW/2bKWxz4cyzK+jm4kW5XrDstRyaIXb 3loN+TCvBTNkyNwkJGeggE1QWVdd1APUYPDkL1JN4wvxpuiUecGX4yKoBN7CEZ77LrRZ 7lMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700250251; x=1700855051; 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=9l9Un6Vq4BKwmZrHqY5GaENjD6mCXDItjRLg6fRH528=; b=c65nRsNtPzXD+PsEJtZLRXCTW5ZcmlGeS2LKV2S6obZTdbmHOx7rNDfp66O4Ew7NRD e8Pym5P1ZZx6OHTWwKEEU/QjMD9K9/+XPotI/tUzTikT78HKgZ1APA1Gi/cQs2Xo8ukQ HsIGwzdtEVLt0NF9IBFxvlnUOo2b5AuH4stNTO9hFGvrQtN6mNNuYVaNXmTE926PKF9q 9+wrXzymWqBpGb9XLSiQWt9BlPj2NttGyviP98YKwSM2D9XWkWeZI+sc4pAOCZJZiOfH /7HC0+rmXzwqesTk68SK5RJRU4UZpUW5sKOCFlXunGGc3xxRVMBd3w0DEuhirKn31Hqj YYRA== X-Gm-Message-State: AOJu0YzA5jEfHrQ8bF7TcIClK1CjR14Xq2Kl22uKTqAJak0Dx7ZtwvuQ SZx8+bWSFiWRpvsweUTe6YF7kSZogpk= X-Google-Smtp-Source: AGHT+IH9iv8LxeZK2QF2F/Toy73+oSMqBWi/E+dwYoA55DwtWDvYIC45mPkTmKCwZfEc+yTArNaNWg== X-Received: by 2002:a05:6870:c392:b0:1e9:9215:3987 with SMTP id g18-20020a056870c39200b001e992153987mr205342oao.16.1700250251366; Fri, 17 Nov 2023 11:44:11 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id y5-20020a056830108500b006cd099bb052sm338193oto.1.2023.11.17.11.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:44:11 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 2/5] drm/panel-elida-kd35t133: hold panel in reset for unprepare Date: Fri, 17 Nov 2023 13:44:02 -0600 Message-Id: <20231117194405.1386265-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231117194405.1386265-1-macroalpha82@gmail.com> References: <20231117194405.1386265-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. Fixes: 5b6603360c12 ("drm/panel: add panel driver for Elida KD35T133 panels") 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 Fri Nov 17 19:44:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13459230 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 39842C072A2 for ; Fri, 17 Nov 2023 19:44:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3A6810E76F; Fri, 17 Nov 2023 19:44:23 +0000 (UTC) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D31410E08F for ; Fri, 17 Nov 2023 19:44:13 +0000 (UTC) Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6ce31c4a653so1231365a34.3 for ; Fri, 17 Nov 2023 11:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700250252; x=1700855052; 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=BUK0KxqwQQVr1ykgLC91ghqfVd5cJU4TsdkFoLiMbfU=; b=HG6+M5D7U+/8RCeHPeJmGwqVrJRRN6jvSfPAunH7+VddjjaI4OPMFrDMsu6Myx1ASG 6loqxc4PnYxfjfN0L9x+cuVTh1ImTfXLeTk1zSvGv4wkdoVX7vyP+Pw7L2I089qa4zEn ajAdPHtibDs011B25Vj+LRPJqUOC1607cCsAKne1pDM8Xz4pdGcKTWGwn/2nqiWBi9ys FcJrOK82nXe0K301nKFHmyr5VL8Bu+OkAwyOM4RrU0Jdm3dyO/3g3r1GXmq9Bb7ahiH5 tymwAkd4IGImFPFi0Zn7r3O+iX8GOJGZsqtm3zEGh6u4CyG6AokinBYUHo+Ja4BF6v9w q60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700250252; x=1700855052; 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=BUK0KxqwQQVr1ykgLC91ghqfVd5cJU4TsdkFoLiMbfU=; b=Em5gamZgejuYF4fFB1PomR8THXbVNFSO9Cn3po71Oxfho+QxrgG8llDZo4fQ6Jr8ol g8+Wj6yPNwvdBWOMfPx5gZ5O/dYSfGp1EAFwUn0LTN1tmKPMIUtPWKdh8mX3cYnoywuF Iw1cMdwjmI24XkmVpe6R4St4UZU8WU4cmsdvJNXLK8cv4N0iQe+kk76yiSSdkXYOl6bZ gcs2xbsGBvBz1gJmU8TkJ+HA8ZGY+eC7CHlOjzxAiP0fTEyijKEkssDdY9ULv1Db5udA 5PtaDqftQzR2iEh01/R69x/ZJ0+UQvxXtpTpmd41CC8ztxXczZQafIXpVyZeXv5NrHtf FRqA== X-Gm-Message-State: AOJu0Yw1gvSEluMPZikFM4UQjPp3Z4KuP+Z80Wl/0JYctwriU/mbQUy6 A/0pMUCfBBH3gSetoD5b7UrWa51o95c= X-Google-Smtp-Source: AGHT+IEmjfwK+LaF6o45YmdCZ05cGwx7GGSjEc84F00U528YvQdlWD3gNRzihxvIUTJcac3VgEHyng== X-Received: by 2002:a9d:5e93:0:b0:6d3:1369:af7 with SMTP id f19-20020a9d5e93000000b006d313690af7mr205832otl.14.1700250252038; Fri, 17 Nov 2023 11:44:12 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id y5-20020a056830108500b006cd099bb052sm338193oto.1.2023.11.17.11.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:44:11 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 3/5] drm/panel-elida-kd35t133: drop drm_connector_set_orientation_from_panel Date: Fri, 17 Nov 2023 13:44:03 -0600 Message-Id: <20231117194405.1386265-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231117194405.1386265-1-macroalpha82@gmail.com> References: <20231117194405.1386265-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 Fri Nov 17 19:44:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13459227 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 C31E4C54FB9 for ; Fri, 17 Nov 2023 19:44:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A657C10E76B; Fri, 17 Nov 2023 19:44:17 +0000 (UTC) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08D9610E76B for ; Fri, 17 Nov 2023 19:44:15 +0000 (UTC) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3b6cfc62514so1143495b6e.0 for ; Fri, 17 Nov 2023 11:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700250254; x=1700855054; 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=Dm+B9LqpTKhZJZ6afsKQk2fW35ugV3YMPYGBr869QBA=; b=BzVRwBQIJUx65pnerJtqy2I+uE3g45fHDtT+U2SplGAfaU4M7ZJ0SQMepfy65YnyOT wdoxtaQ65TUk40gQC0iZNoQCMsc64aQXe9D26ToyE9fphflYUolFOu6wFuwlhYFirK06 KiSkAV0E87L7sZgg5+BcqNfE/k0LekitDA27DS86Jwh9NdBmRwomHHcMXlCb61gUuwfq iPUna3BkNX+iNiffnTd88dBo6jEdLAbGNPcera41ZEIcM2/QHqT5n4lx1plf2f83s1JO ZM6reyzUkFteJ81ci40q3R2/Wdj36Z/Nv+tEiF7lRWlDSgU576jk44njUbYp4ZCHyCuc A/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700250254; x=1700855054; 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=Dm+B9LqpTKhZJZ6afsKQk2fW35ugV3YMPYGBr869QBA=; b=BEGltz1lxWag735q9bLxPmUdNSz8MS/DoyYq6q3ha2bUfMtksUleEymk9VXb8BlXlC vKOUXI2kKv0X05pBmUoX0N0GRiTrP5kh2XxFuqkDus6QmyHSKJT3cyTf69vwK1KcFUDQ nNqdd5fuiY9NhXkBcqfeYWfGQ2D5rCp3hb9YSRTXIukuYTJbCNuZ60nRCFEOKpACMh2N nWtuX4jQjTg/LhVklC+UE5Mk2F34QIqdmdSwrJbt7Fh6NcWTXg9Fq+fnofxFo5IagpeH UP+kl9gK5VSagn3VH5Ib5lDVYmzSeBalOsK+mOBfLCfe6HQrV83DCHx3yk+v7GhikR48 Jc1A== X-Gm-Message-State: AOJu0Yy7gPMZQB3eZ7firD0QwNY0xKsJ3J1yAg88HjAyXB4XJjtKswOY RsKU7oaFXvJukRoLkClrwtck4SorDdQ= X-Google-Smtp-Source: AGHT+IGtvecZpvLRkI5fvhAzyW7c77PVwxoPyk7O2QfCWDl9Uh5UDWR8OWKBw+kMQX6hvXASREYHyw== X-Received: by 2002:a05:6808:1a28:b0:3b2:db2f:9f2 with SMTP id bk40-20020a0568081a2800b003b2db2f09f2mr3037522oib.15.1700250252709; Fri, 17 Nov 2023 11:44:12 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id y5-20020a056830108500b006cd099bb052sm338193oto.1.2023.11.17.11.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:44:12 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 4/5] drm/panel-elida-kd35t133: Drop shutdown logic Date: Fri, 17 Nov 2023 13:44:04 -0600 Message-Id: <20231117194405.1386265-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231117194405.1386265-1-macroalpha82@gmail.com> References: <20231117194405.1386265-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 driver shutdown is duplicate as it calls drm_unprepare and drm_disable which are called anyway when associated drivers are shutdown/removed. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index 29b4ee63d83b..fea3d9e84905 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -296,27 +296,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 +321,6 @@ static struct mipi_dsi_driver kd35t133_driver = { }, .probe = kd35t133_probe, .remove = kd35t133_remove, - .shutdown = kd35t133_shutdown, }; module_mipi_dsi_driver(kd35t133_driver); From patchwork Fri Nov 17 19:44:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13459228 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 3CFB1C5ACB3 for ; Fri, 17 Nov 2023 19:44:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A983D10E76D; Fri, 17 Nov 2023 19:44:17 +0000 (UTC) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A45D10E76B for ; Fri, 17 Nov 2023 19:44:14 +0000 (UTC) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3b40d5ea323so1480526b6e.0 for ; Fri, 17 Nov 2023 11:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700250253; x=1700855053; 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=57wKZQ9CpcI/KABBdYnBmlor/KExRJr0eHFWG2qkyVs=; b=lOZdHnS27wyrhZVfh5cBfush07uLJy98d7unBX68rMYH62zRTbED3U4+0AoyFfPBSe GFN46B9zA5vkcL75NX5s3uGJD9OXaj5miDjalwOYd7TftwK2i+uVJ0hJ/iG1vwIR6YhU RGwy0LiLfPlXYFoW/f59zSexVKWug9WhBbS4iAaa2xLRM8ndl1XJH7GUWPGqF/ZALyK5 ROXaSQcVj7K5zDGeiekF17KzLOZpr2JPlKyQ+qH3DBTM+UTNTSIkfbGadeLYNGQII4cR GvARo1PLWVMWDSU+dDcf5M9M8teWuHcsNgmuxuGNolN4cOneZNFBg9TsogPDzDngfww1 lqeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700250253; x=1700855053; 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=57wKZQ9CpcI/KABBdYnBmlor/KExRJr0eHFWG2qkyVs=; b=iPUD81i4OO84/FFl/OzpGW0ixww12ZGBU1cYbab4RynsRobYOnAsZXCrOtiFprbfBD e9NWhwGT/dIcLRXr3VdSTN6nk2z4MzMUqy/Pun28WZkqNkiJBFKgBislTiQo8dH7sS8l VpmrCgsJK+a/inOJ4xm/S4Ywc/2JH2jhPRHKudrN/NBZzMD+/FhxxHvvOneqMJUusadd Bw38JDiR6gSmXVxg1Fo+e/PSc7XqdtPstIZwbTskwCnA2jUW1IxoMngQuGfBKiHXbinq Ga8LEREUeCR2F+hY2jR4aX9qmK0Bfu7eKdAZAy3pdzNqUa5S3gU6Pc6kqD22DqMyJGEe idSQ== X-Gm-Message-State: AOJu0Yz6/BoUl//pYLltAOreibmSRuUsgFsugJCRDUobOvRLwyPE5dt2 he6Sc5YPKe4cw5GW6oj3d5iprWI9uDM= X-Google-Smtp-Source: AGHT+IHQ0EYg9FWbkoppMB+I2rCvddHn874Ao+DFHShBVAc7+4nIW+v07lHrGo0/JjnaTZ66sxMIIA== X-Received: by 2002:a05:6808:6543:b0:3b5:66af:f8e3 with SMTP id fn3-20020a056808654300b003b566aff8e3mr379628oib.37.1700250253237; Fri, 17 Nov 2023 11:44:13 -0800 (PST) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id y5-20020a056830108500b006cd099bb052sm338193oto.1.2023.11.17.11.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:44:13 -0800 (PST) From: Chris Morgan To: dri-devel@lists.freedesktop.org Subject: [PATCH V2 5/5] drm/panel-elida-kd35t133: Drop prepare/unprepare logic Date: Fri, 17 Nov 2023 13:44:05 -0600 Message-Id: <20231117194405.1386265-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231117194405.1386265-1-macroalpha82@gmail.com> References: <20231117194405.1386265-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 since this commit [1]. [1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel") Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index fea3d9e84905..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: