Message ID | 20220117084225.125868-2-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB7WXSSHQMGQENJO4QAA@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1A08F3F067 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jan 2022 09:42:40 +0100 (CET) Received: by mail-pj1-f69.google.com with SMTP id x14-20020a17090a8a8e00b001b3b14c53afsf14366125pjn.6 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jan 2022 00:42:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642408959; cv=pass; d=google.com; s=arc-20160816; b=ihOMa7reVaMNdHzm5nyp23iQhlW6Moyr0gTbv+CWCcQw6kbTGVCTJu5Jdi3aXOsLDc mQwow71KNCmzrFT/XeI/3yPULkT8ErbsdFTwQC5TGCFPOj75JpFRx3S66F5UDANqHqVl CYrjkJLlp1yVWVFwaQ/31pcnRBkFfA/UhnhGskzAqCoeV/3kP9GCWjnpSxX7s/wgIdHX yCyIS2Q2g8cMxiZ9b2DNVAT5MWiB402MlAg3iQy3moR2C/CPZw1tNLBOZTLwULjY8fDE cQIjtytpaCNNIFNUW8Vw5AmfrfqqxeA9xWSajeDROXY3h98rkJTa40AbwX1k8Br+ZVcQ IdkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Gso/ZjhlrgMmhdoQZjP+XmB4VfqX85bUDboSDTCG/i4=; b=bWRiSALBfq/xny0iyHEp4SnErRZCsN6X/V5xgBAODkr1SAbPtjglnnTQkzsomNvhRm uzeHLVbWEtE5jbiMWUVir89NHQKQWov9F18wmzLKS/VGuePKZLgCsXzrauaIUazxbWNk nHlRuZM8iBOl9AodE61MdY08OBwexehXmtdSjzw0lhG4/5sJ2r32Z/BLbRJDg/fAF49M bCn6KhTYectlCy89EEDl/xpRnTXsRWHHhWt06QgLVBf4MXGUDDGFtJlWzx/yCP2858rA ne+Sm2zefLH2dXwS2hDDV73u+UXlzj2Y/HOfsZ/g4z+9JiXcoYt4dHFXTFJAVPAaX6C6 d96A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oyY5qDzh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Gso/ZjhlrgMmhdoQZjP+XmB4VfqX85bUDboSDTCG/i4=; b=N7sCmwtg6Qe38l3lnkHz5DM1vmjX5BHH+RVlPS5u7gSrpjzHPCBSK6Cw+AKCyAcpJv dcyKm9Nb/wVsRgvwiRfrMSgIpHDdoOBGPBKsBcxlJEwB57uVohQpj87cSL77lRN5yKPs 0d3K0mE/Ku/+Fb1c6FvyIhp5VFhJhySu6RkJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Gso/ZjhlrgMmhdoQZjP+XmB4VfqX85bUDboSDTCG/i4=; b=yw8wISkqzYV+ME++Wk47yiZWYB+iqfV4bD1PjBwJgeubKJPQf/nKZ6ySj7Kc6S1yCl cPMNtAjJT7b17/Xh55n2mbbbpYAvfBG9uiZMk+HgXmeqEPxoDOaFAmL1kizOusSD9miI oj9REU2WCZoRhAReIFxtnXmMY2DVcpF+2cWI5LP76RSTM6Lifw1gncxD7KObmHCPYXsX bf3HdLG1yIf2bVV6QAJNhibuCMFTCj4inCo9QJEuO6L21UmtH3t/9TknsRtwQUfyhaWP 6fxw7bz8nX/IC0VBoVx1Y5ut+lVbKFAlcfcqZk6XD/84hhzHbtJe5rxmPTiyXblVFpd5 /G8g== X-Gm-Message-State: AOAM530uIgrw7uQDeY5P5vO/xQ+zUenVluVExGmMIq+YtOJq7eJ4BtA/ v5RuIlOx6E2XE76T+Vs/U0ANb6Dc X-Google-Smtp-Source: ABdhPJwwNQlJbF1ipoRctSMtRnFSt861DQZMTHeT5vOjzwZ+qJTqj+YwYWo30ODoxJ2Df7qYcRS03g== X-Received: by 2002:a17:90a:5996:: with SMTP id l22mr5435835pji.27.1642408958909; Mon, 17 Jan 2022 00:42:38 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7e1c:: with SMTP id z28ls1753661pgc.6.gmail; Mon, 17 Jan 2022 00:42:38 -0800 (PST) X-Received: by 2002:a63:9356:: with SMTP id w22mr18394460pgm.449.1642408958190; Mon, 17 Jan 2022 00:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642408958; cv=none; d=google.com; s=arc-20160816; b=YucRwtSerLP494U+9eo4VmGbLw+KlAmHczP/Kh7gej0h/e/6C/U0crchSZX20UFvHK 736PANTFNlG6zLLxwOB0U/6orD5JpWf7ZoDHjpp2F9KIvH4SdZx8NY7CgDONgh6a011D kt/1kOMrjFyRUn1G3PVMvYcTIEjiV+vbhGdUYHa7SeGABy/EqyNMQSR+tMlu3+tPKmSG iXGQ8lhUAo4qu+4t8OnXGM9aQ789kvF04jVCaXX0QuaYlFGYjVjFU13PfLnhTcGFRH+8 4JRv9X6o8864EAtmR/UMot8HsO5aqPo/kmIrqwfkS1RR1WbH8nBmNS+9wjtc6JrWpiak Jj/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cFhuM499uRgAGVXd0+qvMKKdWgmvOXkveHsKZuQuM3I=; b=jENwXeDCSHo7+MzmTR8NrLYdJspYYFSgk7KQuXws/XLd/szdVtTzo6L8VdCTYvmwlz Sdh2cbruCrplhjkVznyWDxm21psuiMZLvA6bhj4zYRxy5p8O85WS0/sk5uYD8FGQon6x qoxRlzKFDNfv5HgouvGt3oz07owqw8KmAjI0YEIjoyoHxEvW33U/4yomMZ8LozlkyO7I 5PvEANAAy/jILVayub9RkqTxN4almAm797D8ex4mcZxGRx4TihbLnTrWemB3ydArgqui q4elD/Jkzn66UoQ26XgVz68PFIJ75iOdawZy5fD7i13kfI+CFC+pwrncdrMEWsnFyVaT NL1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oyY5qDzh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a7sor5140811pjo.0.2022.01.17.00.42.38 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 17 Jan 2022 00:42:38 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90a:8804:: with SMTP id s4mr10971030pjn.137.1642408957905; Mon, 17 Jan 2022 00:42:37 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:955a:760d:bbf3:5d4b]) by smtp.gmail.com with ESMTPSA id z3sm11763423pjq.32.2022.01.17.00.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 00:42:37 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Marek Szyprowski <m.szyprowski@samsung.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <narmstrong@baylibre.com>, Robert Foss <robert.foss@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Sam Ravnborg <sam@ravnborg.org>, Michael Nazzareno Trimarchi <michael@amarulasolutions.com>, Inki Dae <inki.dae@samsung.com> Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v5 1/5] drm: bridge: panel: Reset the connector state pointer Date: Mon, 17 Jan 2022 14:12:21 +0530 Message-Id: <20220117084225.125868-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117084225.125868-1-jagan@amarulasolutions.com> References: <20220117084225.125868-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oyY5qDzh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index b32295abd9e7..f6eea194482a 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -83,6 +83,9 @@ static int panel_bridge_attach(struct drm_bridge *bridge, drm_connector_attach_encoder(&panel_bridge->connector, bridge->encoder); + if (connector->funcs->reset) + connector->funcs->reset(connector); + return 0; }
Trigger hotplug event with drm_kms_helper_hotplug_event might fail if the connector state pointer is NULL. BUG observed in exynos dsi driver where drm_bridge_attach is trying to register a connector in panel_bridge before the hotplug event is triggered, WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/drm_atomic_state_helper.c:494 drm_atomic_helper_connector_duplicate_state+0x94/0x9c Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.16.0-rc1-00009-g704b1dbfa4c2 #11058 Hardware name: Samsung Exynos (Flattened Device Tree) [<c0110b30>] (unwind_backtrace) from [<c010c618>] (show_stack+0x10/0x14) [<c010c618>] (show_stack) from [<c0b657d4>] (dump_stack_lvl+0x58/0x70) [<c0b657d4>] (dump_stack_lvl) from [<c01261dc>] (__warn+0xd0/0x134) [<c01261dc>] (__warn) from [<c0b5f628>] (warn_slowpath_fmt+0x5c/0xb4) [<c0b5f628>] (warn_slowpath_fmt) from [<c064bce4>] (drm_atomic_helper_connector_duplicate_state+0x94/0x9c) [<c064bce4>] (drm_atomic_helper_connector_duplicate_state) from [<c0666b64>] (drm_atomic_get_connector_state+0xd4/0x190) [<c0666b64>] (drm_atomic_get_connector_state) from [<c0667928>] (__drm_atomic_helper_set_config+0x314/0x368) [<c0667928>] (__drm_atomic_helper_set_config) from [<c067e628>] (drm_client_modeset_commit_atomic+0x170/0x278) [<c067e628>] (drm_client_modeset_commit_atomic) from [<c067e800>] (drm_client_modeset_commit_locked+0x60/0x1c8) [<c067e800>] (drm_client_modeset_commit_locked) from [<c067e98c>] (drm_client_modeset_commit+0x24/0x40) [<c067e98c>] (drm_client_modeset_commit) from [<c06509c0>] (drm_fb_helper_set_par+0xb8/0xf8) [<c06509c0>] (drm_fb_helper_set_par) from [<c05b86d0>] (fbcon_init+0x2c0/0x518) [<c05b86d0>] (fbcon_init) from [<c060636c>] (visual_init+0xc0/0x108) [<c060636c>] (visual_init) from [<c06085e4>] (do_bind_con_driver+0x1b8/0x3a4) [<c06085e4>] (do_bind_con_driver) from [<c0608b40>] (do_take_over_console+0x13c/0x1e8) [<c0608b40>] (do_take_over_console) from [<c05b6854>] (do_fbcon_takeover+0x78/0xd8) [<c05b6854>] (do_fbcon_takeover) from [<c05b1154>] (register_framebuffer+0x208/0x2e0) [<c05b1154>] (register_framebuffer) from [<c064ead0>] (__drm_fb_helper_initial_config_and_unlock+0x400/0x63c) [<c064ead0>] (__drm_fb_helper_initial_config_and_unlock) from [<c063a718>] (drm_kms_helper_hotplug_event+0x24/0x30) [<c063a718>] (drm_kms_helper_hotplug_event) from [<c068f668>] (exynos_dsi_host_attach+0x174/0x1fc) [<c068f668>] (exynos_dsi_host_attach) from [<c0699354>] (s6e8aa0_probe+0x1b4/0x218) So reset the atomic state for a given connector by freeing the state pointer and allocate a new empty state object. This can be done using connector funcs->reset helper and has to be done before the hotplug even calls. This patch calls the connector->funcs->reset in panel_bridge_attach. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- Changes for v5: - none Changes for v4: - new patch drivers/gpu/drm/bridge/panel.c | 3 +++ 1 file changed, 3 insertions(+)