From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBB813AC0F4 for ; Fri, 17 Jul 2026 10:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784283142; cv=none; b=uXoUDgsFk50P8t7VMNlvzZsAJeiHg0P0wGGl39shLFAIgJ2vacig1BHhi1mvzt6UIkhsCfDyrmXaBwzmioGw7Ts7p2NlqPAAndRNIo/Y0RNrSNuEswR1QJYnbIQbNZra96im/gwa4t6hyKOd8aOCBdDg0MkubUrjQEMmrEMQN18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784283142; c=relaxed/simple; bh=8MUrs1PQltKyP5tLJDX1gHJCYDE41S8tewuvjKtftMk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Xd4vr0dD0/dh2lZpzjPPnXV7vrMakNcv8vq/pp/PidiJKJv1iXy69UJUl49dBMieMUeZWMF/ve56mfSx4HyE3STEooyzLi+U3WKAmri3b6+gntZtZVtNQ0w8fDMP7funoLBYfPNO9OwWsAhUe0+uu2fDO/kE32N9GBSPGL5zsYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kmxq5Fxk; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kmxq5Fxk" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-493b966dd74so30954745e9.3 for ; Fri, 17 Jul 2026 03:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784283139; x=1784887939; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=3RJV9UC3pnAaTAcgCOuWlBvuu7N+6toEb+Gnb0umxzY=; b=kmxq5FxkikIov0z3sRxcBMfJOJhVEBH0QTnhGmcXCcMt9MkFrtljnvUfXJLH5gzy/5 IGFniz6L4Uj2LFW/zmUc5+pUhINYE2UrsOo2OrfJyiATWEA77h0kfqPSOmr/+759hP4r U0KoS+UM/RPcJjXRk1B5IildNN/V2hL6I+Jw2YxGtCkDAtcKOSgsdie9SjWi+lNxJZsp hFO7uJIZCOg2xKoMXDmhalF/zu8bsdXDfpZMndv5cojsB3sEq7qwhIovvMe2Hx31bpD0 U6QDLKjg79HbOaC/i3MchLVdoB+Eq/yyDskpUNe5n63Wap+37g7799BWVfRbp2lMhRkq qxZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784283139; x=1784887939; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=3RJV9UC3pnAaTAcgCOuWlBvuu7N+6toEb+Gnb0umxzY=; b=B/1EwCsIllIvXY7HrD7rvk8qSVdq/H6ofl41Qkx+2YhoQiEb0R0X0IP1vHr/nFHFvy I+VMZ6V2JU08Ayxfa9XmZYalNRa2X6kvqi4UyerytshvHm78jpkvj53bNsyJIEtnvf2M EYcD2T2UqqrkuCidg1FJgymzLjGUPGDCU9n7rqPVBUWGcXiVjNN1q86ZP632eYgFm25v AinoK+SSei9PCrEN5d1JAP81kVHhn8VpgFz4Hp8Bn2TuVMcFNHf1g27WyJgaJZSmnOPE iK+8amUf3+phgDIohkhbHNcuIJc0rwZc/wRwZICYk6ZuA8cPzpQ3Pb62BeZFF29DxRrg s67A== X-Forwarded-Encrypted: i=1; AHgh+Roxwa31r0d5LjZvpzCODZYnR1Na/VPt/NmXtE6Xv17itMfZyA0XTDB/3uMLPqk1CIgBRBM7XSdjQIWK170=@vger.kernel.org X-Gm-Message-State: AOJu0Yx42FLWM92bw0CGu7qsnE0J4t0TdMPAYALySnmWj3A45Kynmq5U 4rAF8Cp0SHm5zliBFttBA8dndXATqkIaKD/NVrlJeU+Jew2Jy/N3nF0szGkNFnHr X-Gm-Gg: AfdE7cmRi6OUnfDxtuAR/mNrJhJs02IhyHjzlpDts4ixa6Hy37SqSxNFAKB4uPX1mkt SPhNi6dXRf02JcE9l88v2FDhRRjU5mIiGmSBZskQP7RAnW99h7jjFCMnA3qhhYUG6JaYPO/ycQ7 Lww79V75zXf9y0ng7Et3OZE2UMDcV1dBYsKWu6EPVdXDmiVO9RFu5vfyAA3R92AZHIkhy15RZNi wrRUYtBEhNc7Fy4uhAXQ1HOyVbWCrka2M66ZqFZiUjODuMFLHdM9Y5pF9Yv0TIUeHBZUWQWsqEp cBdyrO4b3ZK+73faTAp4/Uudfr6SCf2zIkkE/VhFIFeAEv0AsGBAzZ7SYPaZSVGBuaGLiNgD6rE p3fnrDMjb5RHyfJ0FTAx2aDd6+J6I9iyfBbYkPkY6HYbDpWVWSX2Ypde8OMMyP4GcSCh/Mzf3NW UqL2s5DAED+ETDsOtajGDVcXEKfbIHspxMLom/tw== X-Received: by 2002:a05:600d:10c:b0:495:409e:bc80 with SMTP id 5b1f17b1804b1-4954a51b852mr13770135e9.37.1784283138775; Fri, 17 Jul 2026 03:12:18 -0700 (PDT) Received: from michalis-linux (adsl-75.176.58.251.tellas.gr. [176.58.251.75]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e51986sm2846908f8f.11.2026.07.17.03.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2026 03:12:18 -0700 (PDT) Date: Fri, 17 Jul 2026 13:12:17 +0300 From: Michail Tatas To: Doug Anderson Cc: michael@amarulasolutions.com, neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, jesszhan0024@gmail.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/panel: ilitek-ili9805: Use _multi variants Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jul 16, 2026 at 04:31:53PM -0700, Doug Anderson wrote: Hello Doug, thanks a lot for the review! > Hi, > > On Thu, Jul 16, 2026 at 3:09 PM Michail Tatas wrote: > > > > @@ -159,36 +159,23 @@ static int ili9805_power_off(struct ili9805 *ctx) > > > > static int ili9805_activate(struct ili9805 *ctx) > > { > > - struct mipi_dsi_device *dsi = ctx->dsi; > > - struct device *dev = &dsi->dev; > > - int i, ret; > > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > > + int i; > > > > for (i = 0; i < ctx->desc->init_length; i++) { > > const struct ili9805_instr *instr = &ctx->desc->init[i]; > > > > - ret = mipi_dsi_dcs_write_buffer(ctx->dsi, instr->data, instr->len); > > - if (ret < 0) > > - return ret; > > + mipi_dsi_dcs_write_buffer_multi(&dsi_ctx, instr->data, instr->len); > > > > if (instr->delay > 0) > > - msleep(instr->delay); > > - } > > What you've done is an improvement, but it's not all the way there. > Specifically, we'd really want to get rid of the whole "struct > ili9805_instr" type and instead each panel should have an init > function. The "struct ili9805_desc" should have a pointer to the init > function instead of a pointer to the init data. I am more than happy to do these changes as well. My only concern is that I do not have hardware to test the panel. Are compiling and static analysis sufficient tests for these changes ? > For details, you can see a preivous email about this [1], which then > has further links if you want to dig into details. You can see that > Chintan eventually implemented this in commit a89d9a327d06 > ("drm/panel: novatek-nt36672a: Inline panel init sequences"). > > If landing this patch without cleaning up the init sequences is really > important to you, I could be convinced. However, the init sequences > aren't all that big and it would be nice if you could clean it up all > at once. It could be one patch or two. > It is not all that important, I can clean up the init sequences and send it as part of the v2 > [1] http://lore.kernel.org/r/CAD=FV=UCyfjiqcpYCM5ePz-auX4g=i_+i78ivvvyA8R1XtAKzg@mail.gmail.com > > > > @@ -211,25 +198,13 @@ static int ili9805_prepare(struct drm_panel *panel) > > > > static int ili9805_deactivate(struct ili9805 *ctx) > > { > > - struct mipi_dsi_device *dsi = ctx->dsi; > > - struct device *dev = &dsi->dev; > > - int ret; > > - > > - ret = mipi_dsi_dcs_set_display_off(ctx->dsi); > > - if (ret < 0) { > > - dev_err(dev, "Failed to set display OFF (%d)\n", ret); > > - return ret; > > - } > > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > > > > - usleep_range(5000, 10000); > > - > > - ret = mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); > > - if (ret < 0) { > > - dev_err(dev, "Failed to enter sleep mode (%d)\n", ret); > > - return ret; > > - } > > + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); > > + mipi_dsi_usleep_range(&dsi_ctx, 5000, 10000); > > + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); > > > > - return 0; > > + return dsi_ctx.accum_err; > > Nobody looks at the return code of this function. Since you're > touching it anyway, can you change ili9805_deactivate() to return > "void"? I wouldn't object if you made ili9805_power_off() return > "void" in the same patch too, even though it's a bit unrelated to the > rest of the patch. > Good point regarding the return types, I will change them to return void. I will send a v2 with the requested changes. Regards, Michail