From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 965A740DFB4 for ; Thu, 7 May 2026 07:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778137914; cv=none; b=tt6a3FfTW1kUmFGLLVLnPkcQu89sNdcVvdTvpxG+SYe7R+4Rpu6hoYqJ2tykgO9lB8RiTgQRkS704JSqmymXb/oBjA/G4YLBD2Khy3V+rUDvPufxbY/FVVD0UXIopWbBpZIu7eTkEPTPWqa1shNDctusdI+uYERcc2VXcMcBjho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778137914; c=relaxed/simple; bh=A4sxlXdJ5VpsjfAq/q2qS53fkOxEwNUruwMMAmLro40=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=laWQYjE8s+IwukT8xdvvKJqbAkkU2XyQYxcKpDQW3wavCUhNafK00LeQ1VSeKMJdaxU1FQt20e3WbotQjwMzOMTuZ/o+9DA3XWrRQr08Ba2Gju8xnaISwVmAExbXfJiv2GpdsMMD+Z5O5Sslnhryhkq9kGop2WxLkuXiZw9PeoI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Xppp/trV; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Xppp/trV" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43d73422431so405639f8f.2 for ; Thu, 07 May 2026 00:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778137910; x=1778742710; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=bGYzjuf3R/p5pJNr3Enknt/6f+NCeQFDRQlWU1+0ACg=; b=Xppp/trVdcyLaKS24GN+KtoCVLQd+XvV9rIMsu5SMsA2p1bC3JJldBCZ+0+itRGif4 mxey4yVvqwUdwOX0iVLtwap17F6UhfyUpKM1NomNFd+aXSMMPdTCB33tOWNysKGr+HnY UDjNsy9ApmKeI+twrN4NM8PDLW31Z/WFryriyRw+cmA0/nxQooxu8eH+f3L6nOVC29xS INTe+UxnWVvTzXqNXCSbbL+Bv0zpHfn8nGRg3F9AbH5FlorPCBPxO7Gg8rVlFC20gVus p1Po9Aq11h9MG7ng0TY2Yu3BZzrudfMsNltrlO5uem8nlfavq0vvILvfOsne6utnsB/o oXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778137910; x=1778742710; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bGYzjuf3R/p5pJNr3Enknt/6f+NCeQFDRQlWU1+0ACg=; b=HcsaZiq8WWpflQGaT/bze+FzFSJX73tmrCCVTXDwhesm5YMOMzHrKIpBKyeirfyqlI 5YvDmv3FVuXUXeiGAF35tK+tQsghQG9cP9RTAlB4se6zoP9Hzi7Dle3CDZm7PmQS029t 60eWUkQBdJ83SjsFiJsOAVLcwW9T1ydEOj3hOMEA65c2wGQsFmPv51TccSxEri/BIjPy lwXmueG8o0qRz0U9IzEYo6cHsgy/QQs7G2cDPvsbg3GNIAzqsnmC3g/YVLAOUcOmP06P qtdjA8gGQA8F5uW8SYSF3HBkLoSCFdUSaem0aex+GEUfAZGpvpLyEq/1FSI39z0qupIz pmWg== X-Forwarded-Encrypted: i=1; AFNElJ/Xa0CMn+L2sc4zuSyO1g3F1bSWrXnTqXpCOsrhWRHBezwkFz3yaCSMXEkbKQHN7gKw8KuTEwjnuBaaPCQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxrsmJJi2x94/OpqVO+rlIBnZ4Fo25VtpyQW40RbtqhNX+eeSkx YaoDaxejP7Iu2R3BLRMKnC3zJcBwgDX2hAwF13IZ3jpdjFSSx2T/cxdw5tfxs6i4DhI= X-Gm-Gg: AeBDiet3Lq3IMJF+8yHmDb6ZXbmCemhfJ1yYKTCimRkf8XB5RO7uwjcshV7kw6m9+eE 2dCm4bz1wNUO+aO7Dtho4IY4rF4BLaYNKnOYi5Pa+qGTK6046zOJNfDjxY19NJImgWysN2Jzmyx IOXMeHS88EWVzELUmjUPEpaWelESFZKzepqojB9gNk+yDoBbc3KeRUO9YvCa7mv11MiYSxR4gAb rTs4AGzK3/eT96vq3ypEITeP0RqQD1LqK08quSs8IxW8lFUVQjZwOEeKfLgw10c5wFUOGOE2yGj 3vZ901+B5khnt5JfxNkJazUaxhUPhtqka2FZGsPn/jrEkDb97j9STIgK2MFnPMsqa2EGFtvMcaI 6EnAa3tqoliD/LE0PovJJ/onYc0NZMmptrKJ7S0dTyoexFuhiRD6zCh8ylpjZw03hRKScq+AR/r MTJxT4jrCDDvDuLjH84LCu3aN52OJW0DvzerTecv+S64s0CLU2exIHDOeYwrqLAa5erCjYmYFtH nGa8gQA4c5tJGBjUA== X-Received: by 2002:a5d:5d87:0:b0:43d:d037:d59c with SMTP id ffacd0b85a97d-4515b524224mr10977840f8f.16.1778137909805; Thu, 07 May 2026 00:11:49 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:5798:67fd:c866:b378? ([2a01:e0a:106d:1080:5798:67fd:c866:b378]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-450524834eesm17521496f8f.4.2026.05.07.00.11.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2026 00:11:49 -0700 (PDT) Message-ID: Date: Thu, 7 May 2026 09:11:47 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH 1/2] drm/panel: visionox-rm69299: Split DSI commands out into enable/disable To: =?UTF-8?Q?Guido_G=C3=BCnther?= , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, David Heidelberg References: <20260427-visionox-rm69299-enable-v1-0-fa7d62d26d87@sigxcpu.org> <20260427-visionox-rm69299-enable-v1-1-fa7d62d26d87@sigxcpu.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nI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PMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20260427-visionox-rm69299-enable-v1-1-fa7d62d26d87@sigxcpu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/27/26 15:56, Guido Günther wrote: > It's when DSI commands should be sent and it also fixes these DSI errors > on every screen blank/unblank on the SHIFT6mq: > > dmesg: > msm_dsi ae94000.dsi: [drm:dsi_cmds2buf_tx] *ERROR* wait for video done timed out > dsi_cmds2buf_tx: cmd dma tx failed, type=0x5, data0=0x28, len=4, ret=-110 > panel-visionox-rm69299 ae94000.dsi.0: sending DCS SET_DISPLAY_OFF failed: -110 This error is un unprepare, the link should be in LP11 so the command should still work, but you can move them to disable(), but in the other way you should still keep the power on commands in prepare() since the link is in LP11 and video is not flowing. Neil > > Signed-off-by: Guido Günther > --- > drivers/gpu/drm/panel/panel-visionox-rm69299.c | 77 +++++++++++++++----------- > 1 file changed, 44 insertions(+), 33 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c > index f1430370ff94..3c92a6ceb8df 100644 > --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c > +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c > @@ -158,6 +158,46 @@ static inline struct visionox_rm69299 *panel_to_ctx(struct drm_panel *panel) > return container_of(panel, struct visionox_rm69299, panel); > } > > +static int visionox_rm69299_enable(struct drm_panel *panel) > +{ > + struct visionox_rm69299 *ctx = panel_to_ctx(panel); > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > + > + ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM; > + > + for (int i = 0; i < ctx->desc->init_seq_len; i++) > + mipi_dsi_dcs_write_buffer_multi(&dsi_ctx, &ctx->desc->init_seq[i * 2], 2); > + > + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); > + > + /* Per DSI spec wait 120ms after sending exit sleep DCS command */ > + mipi_dsi_msleep(&dsi_ctx, 120); > + > + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); > + > + /* Per DSI spec wait 120ms after sending set_display_on DCS command */ > + mipi_dsi_msleep(&dsi_ctx, 120); > + > + return dsi_ctx.accum_err; > +} > + > +static int visionox_rm69299_disable(struct drm_panel *panel) > +{ > + struct visionox_rm69299 *ctx = panel_to_ctx(panel); > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > + > + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; > + > + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); > + > + /* 120ms delay required here as per DCS spec */ > + mipi_dsi_msleep(&dsi_ctx, 120); > + > + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); > + > + return dsi_ctx.accum_err; > +} > + > static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx) > { > int ret; > @@ -193,16 +233,6 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx) > static int visionox_rm69299_unprepare(struct drm_panel *panel) > { > struct visionox_rm69299 *ctx = panel_to_ctx(panel); > - struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > - > - ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; > - > - mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); > - > - /* 120ms delay required here as per DCS spec */ > - mipi_dsi_msleep(&dsi_ctx, 120); > - > - mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); > > return visionox_rm69299_power_off(ctx); > } > @@ -210,29 +240,8 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel) > static int visionox_rm69299_prepare(struct drm_panel *panel) > { > struct visionox_rm69299 *ctx = panel_to_ctx(panel); > - struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > - int ret, i; > > - ret = visionox_rm69299_power_on(ctx); > - if (ret < 0) > - return ret; > - > - ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM; > - > - for (i = 0; i < ctx->desc->init_seq_len; i++) > - mipi_dsi_dcs_write_buffer_multi(&dsi_ctx, &ctx->desc->init_seq[i * 2], 2); > - > - mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); > - > - /* Per DSI spec wait 120ms after sending exit sleep DCS command */ > - mipi_dsi_msleep(&dsi_ctx, 120); > - > - mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); > - > - /* Per DSI spec wait 120ms after sending set_display_on DCS command */ > - mipi_dsi_msleep(&dsi_ctx, 120); > - > - return dsi_ctx.accum_err; > + return visionox_rm69299_power_on(ctx); > } > > static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = { > @@ -284,7 +293,9 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel, > > static const struct drm_panel_funcs visionox_rm69299_drm_funcs = { > .unprepare = visionox_rm69299_unprepare, > - .prepare = visionox_rm69299_prepare, > + .disable = visionox_rm69299_disable, > + .prepare = visionox_rm69299_prepare, > + .enable = visionox_rm69299_enable, > .get_modes = visionox_rm69299_get_modes, > }; > >