From patchwork Fri Feb 14 17:29:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Vipin X-Patchwork-Id: 13975385 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 1DD91C021A4 for ; Fri, 14 Feb 2025 17:30:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 97A5810ED1D; Fri, 14 Feb 2025 17:30:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="J20r7XoF"; dkim-atps=neutral Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BD9910ED1D for ; Fri, 14 Feb 2025 17:30:29 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-220f4dd756eso15980895ad.3 for ; Fri, 14 Feb 2025 09:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739554228; x=1740159028; 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=zJYNUML0MGQT9wXkxrbGgMrZtvn5S8KShebTQWoG8yw=; b=J20r7XoFRshrVME4kufPNF5xW+2bZZKA/jhp5CbkwmGKK5qPEHW7qYAsmAqGeGbw/i GNPBjdU0/bvmjiH0mcfFABf7nv+O1Pm6PqdK+jSg0u13l6amrGK/hqnMndvtu3BDke6r yQFUGxwnZcoBg26ElXPRdjY7CwdwUBASpN9axWbm6d+hIerY0mPf9HZAB6iLYO7KWun8 DPPPeCgofsEZejUTBA97LKXXDAE+qbzhVXbZoLWeu2l4CyRJ/FRXSuE8iInsosHgybSm RkDb9xtQiuDB2cq45vosxmWO2TOTYYXd+JEuVl1KwGk+2AxKAiaxJr2sAqVlQJXB3Zwj IU9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739554228; x=1740159028; 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=zJYNUML0MGQT9wXkxrbGgMrZtvn5S8KShebTQWoG8yw=; b=TqSgMHowb9YQDz6OhB/jWyud/Bx1QN5nKbIOAAQAV+RKbT8gBdhMuumYuxpqF6+dnc tkZ2o7KhHuIxhbk0yyGzJfepMU2v/qbbsA2Tjcb6VOG8b5Sf+72VwmDTmy2fObMxu87N gj5cToLXAxl5jCJH1mllPKCiearskxpSUNDud6fl9Nzp41uQEGn+eCiwLPuyRosASl4U rF7W7LbZU+wyFB2VmDIQhpn32dZRosiOuHIkcGl8CLCl9U04QVkCN/XZGlX2pgATlXRe BLj54lyL1B4tBcWCfM20ihAgWsVTZr2OL9lN4/TiYkm9o8lda4Gf/b6bCe+kc6PXDxBe 90Ng== X-Forwarded-Encrypted: i=1; AJvYcCWeZmTucJtCG8fzOt/FbgwvOZHbdTO7Qh4a0ucCqIlqydFJX/njwY+amLD02qURZ05IyhMLE+jEG/w=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yzyzpe1pfQ7f6Lfk1aJAao2zf9TUxjAsN93ZUhnCz2rMdpRR9eE Gh6IN+unWeEUXVrX4YBO0kJxl0IH/TXtxLR49Yr2DU9ssr9GadJ3 X-Gm-Gg: ASbGncsFjotfsD1CdxVdlbaEPa4lg9q1RQ9qyifnVVuecDpyvAmrxn3ixY4Lb//Acmj RAplQnm8LMdELqixprtFLgn+hAtqhjiK7yBCMZOsTUkZKecEoW1u+cQ+xj+Y6KPeLIedIarGKrF fcvTSp3VGG+J8L37tWZM9PidtybNkPcQp2yC0REpW9s/6ZutbW0COIGMC6KoGPDGR3spqD/7PO5 4I8VyiE7X2aVCts2XuFk+LCT3dfDeegoCD9lDenpxH1JavX950uXoFdorXFRNtLq9NWAXBVWN8c KaH0Y6iGwEMK2J+j5r8DfiJoCpLSK9lCFA== X-Google-Smtp-Source: AGHT+IGRkAOywRNji7tmotJx2ENcSkoDdiOXtImZCqPHJSs6Zt+vtvGSgMvUaBHElRF2eP2aIEIdSA== X-Received: by 2002:a05:6a21:6e91:b0:1ee:321b:313b with SMTP id adf61e73a8af0-1ee8cc16c14mr490265637.41.1739554228635; Fri, 14 Feb 2025 09:30:28 -0800 (PST) Received: from distilledx.SRMIST.EDU.IN ([59.152.80.69]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-adcc6fb20f8sm1355138a12.37.2025.02.14.09.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 09:30:28 -0800 (PST) From: Tejas Vipin To: neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Cc: quic_jesszhan@quicinc.com, dianders@chromium.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tejas Vipin Subject: [PATCH 1/2] drm/mipi-dsi: Replace mipi_dsi_dcs_set_tear_off with its multi version Date: Fri, 14 Feb 2025 22:59:57 +0530 Message-ID: <20250214172958.81258-2-tejasvipin76@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214172958.81258-1-tejasvipin76@gmail.com> References: <20250214172958.81258-1-tejasvipin76@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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" mipi_dsi_dcs_set_tear_off can heavily benefit from being converted to a multi style function as it is often called in the context of similar functions. Signed-off-by: Tejas Vipin --- drivers/gpu/drm/drm_mipi_dsi.c | 42 +++++++++++++++++++--------------- include/drm/drm_mipi_dsi.h | 2 +- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 5e5c5f84daac..2e148753ea97 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -1265,25 +1265,6 @@ int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start, } EXPORT_SYMBOL(mipi_dsi_dcs_set_page_address); -/** - * mipi_dsi_dcs_set_tear_off() - turn off the display module's Tearing Effect - * output signal on the TE signal line - * @dsi: DSI peripheral device - * - * Return: 0 on success or a negative error code on failure - */ -int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi) -{ - ssize_t err; - - err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_OFF, NULL, 0); - if (err < 0) - return err; - - return 0; -} -EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_off); - /** * mipi_dsi_dcs_set_tear_on() - turn on the display module's Tearing Effect * output signal on the TE signal line. @@ -1713,6 +1694,29 @@ void mipi_dsi_turn_on_peripheral_multi(struct mipi_dsi_multi_context *ctx) } EXPORT_SYMBOL(mipi_dsi_turn_on_peripheral_multi); +/** + * mipi_dsi_dcs_set_tear_off_multi() - turn off the display module's Tearing Effect + * output signal on the TE signal line + * @ctx: Context for multiple DSI transactions + */ +void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx) +{ + struct mipi_dsi_device *dsi = ctx->dsi; + struct device *dev = &dsi->dev; + ssize_t err; + + if (ctx->accum_err) + return; + + err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_OFF, NULL, 0); + if (err < 0) { + ctx->accum_err = err; + dev_err(dev, "Failed to set tear off: %d\n", + ctx->accum_err); + } +} +EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_off_multi); + /** * mipi_dsi_dcs_soft_reset_multi() - perform a software reset of the display module * @ctx: Context for multiple DSI transactions diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 94400a78031f..bd40a443385c 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -346,7 +346,6 @@ int mipi_dsi_dcs_set_column_address(struct mipi_dsi_device *dsi, u16 start, u16 end); int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start, u16 end); -int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi); int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi, enum mipi_dsi_dcs_tear_mode mode); int mipi_dsi_dcs_set_pixel_format(struct mipi_dsi_device *dsi, u8 format); @@ -379,6 +378,7 @@ void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx, u16 start, u16 end); void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_dsi_multi_context *ctx, u16 scanline); +void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx); /** * mipi_dsi_generic_write_seq - transmit data using a generic write packet From patchwork Fri Feb 14 17:29:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Vipin X-Patchwork-Id: 13975386 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 55A68C02198 for ; Fri, 14 Feb 2025 17:30:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB00710ED23; Fri, 14 Feb 2025 17:30:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S1EBnMjc"; dkim-atps=neutral Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0873010ED23 for ; Fri, 14 Feb 2025 17:30:33 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-22100006bc8so7714965ad.0 for ; Fri, 14 Feb 2025 09:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739554233; x=1740159033; 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=JG67CoErQ4jk/j2wz6ZGsEzl+oGpqJgy4uTscNC0oGk=; b=S1EBnMjcps3AR87BCthoWqn3Zk2PxiiwAXkI0FlLxokLYe2eyuG934wILuPp/tyLq7 3l+iWnZrm12YvgKpp3nfpIK37je0jpFclBSjkaE9ifN/ukjkm3M/yvZTX3G+38C6FAe4 eSZIag/YkqSXma8Ubn/MWWkmHmM5n9MYBxx76PSvhzXSK7Aus80Y2JT8ik9WpqZnvI9N SAOkqquK9Y9MkjBxwNtTuXs5YVtezrAv5obuzd5IqlwCJHIm54FVB0x9qt79A9aOEkXX soOoIzgXjq2PoxRGW+zO5/a3rwmtR6oX/Kfoyy7BD5PQMQUSHLJN7/l7pXe6KLzsVQ/t wgcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739554233; x=1740159033; 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=JG67CoErQ4jk/j2wz6ZGsEzl+oGpqJgy4uTscNC0oGk=; b=V8EtT9F636OJ/evtlkk2XAiB8QF0RZHwaeoSDcfrH0FMSyQsLAO6MxvAiNcFrlK07q RuFikAVuIBB+tiGbYCgWkKgSHTKAE2GhGYSMBpV/Lec2MJlkXnXB1NdymTj3CQnJm5XH ywpV3V16mj5Ib854aJHkRcjWqRi619hfmQrgMN80Cfw2gYzLH3qn3Dha+JJEwgqFH3Tm 4TLWyfaQOznS5L8FbWtK9yadmIXN4G8xbGbFmVw7RdbKQkFQISvsbbRF++EecHV5ceQd IfOTsx0VDn+Y9naZQA9bJDS/oUVnTczApowOS1exJqNs1zfQSZ5JJogaA59wagtwaQQJ 3DcQ== X-Forwarded-Encrypted: i=1; AJvYcCUil3+G2tchkLpj1hNy29kZ/QTfkBxQOrUWY+oAntwhCTy8PTgZ1QoKSOKkrPWRuzRr0sr1IfM8u2Y=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzQ/o88/6UBTx0UPqJFfpR6zESl+LnH9WUSQQB1THjb9ZaqraV2 vkSOZUb3W/ea832BlOn7fpOUWEPUtzJ7xz3GzeftNidcBNQxGPYV X-Gm-Gg: ASbGncvsqrFoTu2qVlUa8wi22Nsq/BY+DHH6iP/9CY8JpRKI60dmKbO5MV11slNU5dK Y+yKYc4KKhi9uQ6bp24l1l27x1JS2ZLuTtcV77QxEm/vnOju6EZDffepwDxxmfLkDW9DNxSFqK7 OJoEoMCjpzOXlVWp+gwZ43rwm86660Ty6sn4vCzEqUBcqtklKEmolM1eOuMtVyPqPiUT0Ln9yot FAW5RvKNh53BjJEBfpgUCxcKkWY0B2pNJAidmVfAvMtpyIGg2uZrw2pF5NA+o2H60adn2vusfVH ivU8UpqwP/Su9aYMhe2UEwcYDwgsGqQVzQ== X-Google-Smtp-Source: AGHT+IEo0wiggK4AdGkrdqyzJ6jWqqzwh3wptoY15dEQvTVEJw6wVA6kehfEZXMQuLRKEaZFZ1jYkw== X-Received: by 2002:a05:6a21:e8c:b0:1eb:48e2:2c2f with SMTP id adf61e73a8af0-1ee8cbc1ea9mr535075637.30.1739554233442; Fri, 14 Feb 2025 09:30:33 -0800 (PST) Received: from distilledx.SRMIST.EDU.IN ([59.152.80.69]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-adcc6fb20f8sm1355138a12.37.2025.02.14.09.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 09:30:33 -0800 (PST) From: Tejas Vipin To: neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Cc: quic_jesszhan@quicinc.com, dianders@chromium.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tejas Vipin Subject: [PATCH 2/2] drm/panel: sony-td4353-jdi: transition to mipi_dsi wrapped functions Date: Fri, 14 Feb 2025 22:59:58 +0530 Message-ID: <20250214172958.81258-3-tejasvipin76@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250214172958.81258-1-tejasvipin76@gmail.com> References: <20250214172958.81258-1-tejasvipin76@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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Change the sony-td4353-jdi panel to use multi style functions for improved error handling. Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 107 ++++-------------- 1 file changed, 23 insertions(+), 84 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c index 472195d4bbbe..97f4bb4e1029 100644 --- a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c @@ -47,93 +47,40 @@ static inline struct sony_td4353_jdi *to_sony_td4353_jdi(struct drm_panel *panel static int sony_td4353_jdi_on(struct sony_td4353_jdi *ctx) { struct mipi_dsi_device *dsi = ctx->dsi; - struct device *dev = &dsi->dev; - int ret; + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; dsi->mode_flags |= MIPI_DSI_MODE_LPM; - ret = mipi_dsi_dcs_set_column_address(dsi, 0x0000, 1080 - 1); - if (ret < 0) { - dev_err(dev, "Failed to set column address: %d\n", ret); - return ret; - } - - ret = mipi_dsi_dcs_set_page_address(dsi, 0x0000, 2160 - 1); - if (ret < 0) { - dev_err(dev, "Failed to set page address: %d\n", ret); - return ret; - } - - ret = mipi_dsi_dcs_set_tear_scanline(dsi, 0); - if (ret < 0) { - dev_err(dev, "Failed to set tear scanline: %d\n", ret); - return ret; - } - - ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); - if (ret < 0) { - dev_err(dev, "Failed to set tear on: %d\n", ret); - return ret; - } + mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0x0000, 1080 - 1); + mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0x0000, 2160 - 1); + mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx, 0); + mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK); + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x00); - mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x00); - - ret = mipi_dsi_dcs_set_pixel_format(dsi, 0x77); - if (ret < 0) { - dev_err(dev, "Failed to set pixel format: %d\n", ret); - return ret; - } - - mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_ROWS, - 0x00, 0x00, 0x08, 0x6f); - - ret = mipi_dsi_dcs_exit_sleep_mode(dsi); - if (ret < 0) { - dev_err(dev, "Failed to exit sleep mode: %d\n", ret); - return ret; - } - msleep(70); + mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx, 0x77); + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_PARTIAL_ROWS, + 0x00, 0x00, 0x08, 0x6f); - mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_MEMORY_START); + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); + mipi_dsi_msleep(&dsi_ctx, 70); + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_MEMORY_START); + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); - ret = mipi_dsi_dcs_set_display_on(dsi); - if (ret < 0) { - dev_err(dev, "Failed to turn display on: %d\n", ret); - return ret; - } - - return 0; + return dsi_ctx.accum_err; } -static int sony_td4353_jdi_off(struct sony_td4353_jdi *ctx) +static void sony_td4353_jdi_off(struct sony_td4353_jdi *ctx) { struct mipi_dsi_device *dsi = ctx->dsi; - struct device *dev = &dsi->dev; - int ret; + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; - ret = mipi_dsi_dcs_set_display_off(dsi); - if (ret < 0) { - dev_err(dev, "Failed to set display off: %d\n", ret); - return ret; - } - msleep(22); - - ret = mipi_dsi_dcs_set_tear_off(dsi); - if (ret < 0) { - dev_err(dev, "Failed to set tear off: %d\n", ret); - return ret; - } - - ret = mipi_dsi_dcs_enter_sleep_mode(dsi); - if (ret < 0) { - dev_err(dev, "Failed to enter sleep mode: %d\n", ret); - return ret; - } - msleep(80); - - return 0; + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); + mipi_dsi_msleep(&dsi_ctx, 22); + mipi_dsi_dcs_set_tear_off_multi(&dsi_ctx); + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); + mipi_dsi_msleep(&dsi_ctx, 80); } static void sony_td4353_assert_reset_gpios(struct sony_td4353_jdi *ctx, int mode) @@ -146,14 +93,11 @@ static void sony_td4353_assert_reset_gpios(struct sony_td4353_jdi *ctx, int mode static int sony_td4353_jdi_prepare(struct drm_panel *panel) { struct sony_td4353_jdi *ctx = to_sony_td4353_jdi(panel); - struct device *dev = &ctx->dsi->dev; int ret; ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); - if (ret < 0) { - dev_err(dev, "Failed to enable regulators: %d\n", ret); + if (ret < 0) return ret; - } msleep(100); @@ -161,7 +105,6 @@ static int sony_td4353_jdi_prepare(struct drm_panel *panel) ret = sony_td4353_jdi_on(ctx); if (ret < 0) { - dev_err(dev, "Failed to power on panel: %d\n", ret); sony_td4353_assert_reset_gpios(ctx, 0); regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); return ret; @@ -173,12 +116,8 @@ static int sony_td4353_jdi_prepare(struct drm_panel *panel) static int sony_td4353_jdi_unprepare(struct drm_panel *panel) { struct sony_td4353_jdi *ctx = to_sony_td4353_jdi(panel); - struct device *dev = &ctx->dsi->dev; - int ret; - ret = sony_td4353_jdi_off(ctx); - if (ret < 0) - dev_err(dev, "Failed to power off panel: %d\n", ret); + sony_td4353_jdi_off(ctx); sony_td4353_assert_reset_gpios(ctx, 0); regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);