From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 2F3BB28506B for ; Tue, 2 Dec 2025 10:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764672971; cv=none; b=JdqIHsHlDZm1qJQxRkLwVHqujGmx0OkGi9UA3q3zHmRbn4AwDWTmA3ulCDSsj4fGKI/nULdl3xx33cXfZbDhYSAhzmp3MvKaT6VwoUuU5Y7QhByZJ1whofhzUDnb2ntbj4ZOPMuATRasWD6uvaQaSArJcatYzSzee/dqoC6wRnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764672971; c=relaxed/simple; bh=5QPqjLcy+uoya6TepPFnlqxc3TR/wC7U4Pv6bjnPUbk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kDt8Ib4iepnKJkveOO9gni9w4/96yqHroKHW5amyIx6PSy4ArlQ74zTQfdWCjxpGFTnKUtcdYkWBGYMk3t+nr22y5A74/+zJ6IgFoQ1D38jZ1+52pWlwHsVMxSqXnqSrhV6Xa/l0GSwo+wdQXFD5lbYQLik3+ZN89+UqhBJdJqc= 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=bh0Builh; arc=none smtp.client-ip=209.85.208.46 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="bh0Builh" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-64149f78c0dso8074574a12.3 for ; Tue, 02 Dec 2025 02:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764672967; x=1765277767; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ehri81yPiQwv2TtMVBNaIP6q+no9/49Tq7gYw/RdK/w=; b=bh0BuilhnYA6M0lfLN0mu9i+rLqGarSPq/d/91dmM5zd4+0S52vGJLVYdIJUKOXNqj Nt2aTtWS4bkVOl7nWD/Rvv46/DKCL0XcBmRpNp9eNBFMZb9jzplxGVaj4JQFrGNBqXh+ NhlQy2p2L4ON/71aj1UqvUxDyCCDgynKwG9ZAI7CSQOsWcigDg0qft9uYGagnvlyMB49 E1tfdoi/gAxVyi6MIXGY4jtApM/YWvfeFooh7vs88Lif7INg+YjKtLspYYR2jfQiKY/+ YENYqunUuNmiy6JjHsCnxt4RyMqCV0xEC/NCAl64+qAbeay0aAkxd3R+0TXl1bQxQeBu QK6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764672967; x=1765277767; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ehri81yPiQwv2TtMVBNaIP6q+no9/49Tq7gYw/RdK/w=; b=igGkQP+M3n7LFUZ5V1MsBH03mdcS+2fHFpw78K90fxsrukbTon9/2MRhi9U9IrobvJ KYAEJT3mrP00jLIbcEFuO2Lzjr8SVg58RPe2QpBbtbLRA6dgqBFdNCZjXt1sJv6sUt0P H3W21L1eJVNuEAgDqIyNG9zBVLc3L2/sHDYmiWOi0hp074fYaNRg05wFt7O7CszoTzDK yltOfffy2w6JtVPSrm75DcZb7KxIp74mzOi69p7T7kfF1scHzIZ4eguWFccVQXuqxS37 gDePW4D7dJDy/DvTXfRD4W1TbiQepKpWgS5YTIIaX45aVlKXorKQq7695PexA+jUYQkW AU4A== X-Forwarded-Encrypted: i=1; AJvYcCWcgiIsO6HeXzYRtEY4AXBWCJOTMccuyLGgmrjESYEdUeJDmNbTp09rAbnpp/iFnu7k46NEhyeI0fWJva4=@vger.kernel.org X-Gm-Message-State: AOJu0YyQfvRI2PJ4vQrSjc6fp/Zg9vKo24j68tTIj6w53NH/TNL3AI6s 603IiGPdQZaH9YNU0HUvgtLqZEQZXXnpFQsCv/zZ+eSzZcarNrlEBRg6 X-Gm-Gg: ASbGncur2bQ3g78ycW/HKgB1rYepTVihP/ToI40h2fuaeeyK191QTEH2UP2v4VT99go 5qrbZELPUnk6PojPwCVBHBd9d6f8J5nPaGB4/CpC4SChRtLYSZQCbH3Xdk4Hx1wcDyinjf+xmzO vDN5PLFDEYsNTnu7uo7Bh/1qqwwVEcx8BZNPormauITuyn2nKlGQKnD4jrE4zEZ3uKFGFAXye/Z 6Yj/m9wAq+ZL/PrnXZg7MxQrNyYab20neflkj8go0qnOrc8Xq4TtFPR5FpX0+KPr092PRytZA+w kAc9tOLId3xbvyO4IcriQPEnpMSxFKjucjcsqSZPBXMLEOX7IlwZvKfTzSYahmqLKKFnTcjdCb8 RSfXAlja9HC4Gg7SeyqkHxX0lti69S24PAjzoS71i/IMvUnG8t8Ke/YX7UD7yD4tSFjs1+QwMnN bsspddUuAoVbEx3w2W2TZfP2DXGTKlQrXpG38sUPXqrAi7w1MEYw== X-Google-Smtp-Source: AGHT+IGDWo9fAKrIqK6pOzWcubTiXGsGXBZvWB+hJAa+IdynlbdlFuxAhEoOWusf+Q1ptI8yJnHO7A== X-Received: by 2002:a05:6402:4405:b0:640:c95c:be17 with SMTP id 4fb4d7f45d1cf-64555cd8ccfmr40873221a12.16.1764672967228; Tue, 02 Dec 2025 02:56:07 -0800 (PST) Received: from [10.251.131.228] (93-44-9-97.ip94.fastwebnet.it. [93.44.9.97]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64751061e14sm16962796a12.31.2025.12.02.02.56.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Dec 2025 02:56:06 -0800 (PST) Message-ID: <19d4abb7-551b-4c86-aee0-a3ae7b054ba9@gmail.com> Date: Tue, 2 Dec 2025 11:56:04 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/bridge: ti-sn65dsi83: ignore PLL_UNLOCK errors To: Luca Ceresoli , =?UTF-8?Q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Philippe Schenker , Hui Pu , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, =?UTF-8?Q?Herv=C3=A9_Codina?= References: <20251127-drm-ti-sn65dsi83-ignore-pll-unlock-v1-1-8a03fdf562e9@bootlin.com> Content-Language: en-US From: Emanuele Ghidoli In-Reply-To: <20251127-drm-ti-sn65dsi83-ignore-pll-unlock-v1-1-8a03fdf562e9@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 27/11/2025 09:42, Luca Ceresoli wrote: > On hardware based on Toradex Verdin AM62 the recovery mechanism added by > commit ad5c6ecef27e ("drm: bridge: ti-sn65dsi83: Add error recovery > mechanism") has been reported [0] to make the display turn on and off and > and the kernel logging "Unexpected link status 0x01". > > According to the report, the error recovery mechanism is triggered by the > PLL_UNLOCK error going active. Analysis suggested the board is unable to > provide the correct DSI clock neede by the SN65DSI84, to which the TI > SN65DSI84 reacts by raising the PLL_UNLOCK, while the display still works > apparently without issues. > > On other hardware, where all the clocks are within the components > specifications, the PLL_UNLOCK bit does not trigger while the display is in > normal use. It can trigger for e.g. electromagnetic interference, which is > a transient event and exactly the reason why the error recovery mechanism > has been implemented. > > Idelly the PLL_UNLOCK bit could be ignored when working out of > specification, but this requires to detect in software whether it triggers > because the device is working out of specification but visually correctly > for the user or for good reasons (e.g. EMI, or even because working out of > specifications but compromising the visual output). > > The ongoing analysis as of this writing [1][2] has not yet found a way for > the driver to discriminate among the two cases. So as a temporary measure > mask the PLL_UNLOCK error bit unconditionally. > > [0] https://lore.kernel.org/r/bhkn6hley4xrol5o3ytn343h4unkwsr26p6s6ltcwexnrsjsdx@mgkdf6ztow42 > [1] https://lore.kernel.org/all/b71e941c-fc8a-4ac1-9407-0fe7df73b412@gmail.com/ > [2] https://lore.kernel.org/all/20251125103900.31750-1-francesco@dolcini.it/ > > Closes: https://lore.kernel.org/r/bhkn6hley4xrol5o3ytn343h4unkwsr26p6s6ltcwexnrsjsdx@mgkdf6ztow42 > Cc: stable@vger.kernel.org # 6.15+ > Co-developed-by: Hervé Codina > Signed-off-by: Hervé Codina > Signed-off-by: Luca Ceresoli > --- > Francesco, Emanuele, João: can you please apply this patch and report > whether the display on the affected boards gets back to working as before? > > Cc: João Paulo Gonçalves > Cc: Francesco Dolcini > Cc: Emanuele Ghidoli > --- > drivers/gpu/drm/bridge/ti-sn65dsi83.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c > index 033c44326552..fffb47b62f43 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c > @@ -429,7 +429,14 @@ static void sn65dsi83_handle_errors(struct sn65dsi83 *ctx) > */ > > ret = regmap_read(ctx->regmap, REG_IRQ_STAT, &irq_stat); > - if (ret || irq_stat) { > + > + /* > + * Some hardware (Toradex Verdin AM62) is known to report the > + * PLL_UNLOCK error interrupt while working without visible > + * problems. In lack of a reliable way to discriminate such cases > + * from user-visible PLL_UNLOCK cases, ignore that bit entirely. > + */ > + if (ret || irq_stat & ~REG_IRQ_STAT_CHA_PLL_UNLOCK) { > /* > * IRQ acknowledged is not always possible (the bridge can be in > * a state where it doesn't answer anymore). To prevent an > @@ -654,7 +661,7 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge, > if (ctx->irq) { > /* Enable irq to detect errors */ > regmap_write(ctx->regmap, REG_IRQ_GLOBAL, REG_IRQ_GLOBAL_IRQ_EN); > - regmap_write(ctx->regmap, REG_IRQ_EN, 0xff); > + regmap_write(ctx->regmap, REG_IRQ_EN, 0xff & ~REG_IRQ_EN_CHA_PLL_UNLOCK_EN); > } else { > /* Use the polling task */ > sn65dsi83_monitor_start(ctx); > > --- > base-commit: c884ee70b15a8d63184d7c1e02eba99676a6fcf7 > change-id: 20251126-drm-ti-sn65dsi83-ignore-pll-unlock-4a28aa29eb5c > > Best regards, Hi Luca, the display works correctly with this patch, thanks! Kind regards. Tested-by: Emanuele Ghidoli