From patchwork Thu Jul 8 23:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471344 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp727268jao; Thu, 8 Jul 2021 16:03:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwglfb4whEbEQtLkOgAqG9MwNpurOhslHnEESYb39pHJv9z0/N+tFcnO1h5DkJQJywa4Lu4 X-Received: by 2002:a17:903:2345:b029:12a:cfac:3cd8 with SMTP id c5-20020a1709032345b029012acfac3cd8mr2283092plh.26.1625785418217; Thu, 08 Jul 2021 16:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625785418; cv=none; d=google.com; s=arc-20160816; b=k2QIxzAqE0HjAeX2xGsZnG3611GcJLAqh8xgO4no6oS2C0fv97wlj3rCymJIxhE5X8 ulLiDDri8IMLdbK+YTeVl99Ws+hpCETxPyczt5p0VAu24JKGdE4faOPDmSIBBeqbGz/1 XZFIEmp9snTdj5CrSxQRkZK0rP7jWPSWNi5s4DrG1EJ5BlBs670E2TtfQbVWtxiQgPq9 yquJhYzAnp2yUzn+Q8hoE7VFW/axpVplrqn8tC8t0Q8ZinK9j1SuG8HQP1CBYmBNARzb 4MsyPQP5wtMDE1nZN7cr5Pzjc/RhkB+D0W89352vZl86/+WBC8US0xKTdEb6OVk5+QdH EYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=MmU1HG2iYGV6JEeDyyVDdrnq6JazLk/+ZHGeiYN3Id8=; b=SkkjUU2QyHDUlWuJQ5cjuDdtQFXWdDTwZvXoU/t45bsU+SOc13CehcKO6evmzr/ujz h3u9QnL+JF1uC2hh6Qtafdyk/K4SmOREzSszm+PsjWFqSmPKvbenZEN2msOa7pjI6cBa H/ppBOjF3UrgWKsOTHKrWlnrG1HIFix23WGdaa8okQfX7f5m4xXfxBnBQ0IUL/ftD3l1 mv+savzTzmMrAPWS8EBwBgr2nHu+9WR++LeN58f921d04KGtpbRfrO+wA6P+ux0kTZXJ i/iJrn2kdnMIPqspNKnV36nEpigrccpq04SlCkzG7icn1cUOx5+gIETDOWxN3eaOZD3+ SxiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Anr3Kvt0; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id w89si9686754pjw.60.2021.07.08.16.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 16:03:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Anr3Kvt0; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA9956E92F; Thu, 8 Jul 2021 23:03:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9A986E92F for ; Thu, 8 Jul 2021 23:03:31 +0000 (UTC) Received: by mail-lj1-x234.google.com with SMTP id u25so4934694ljj.11 for ; Thu, 08 Jul 2021 16:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MmU1HG2iYGV6JEeDyyVDdrnq6JazLk/+ZHGeiYN3Id8=; b=Anr3Kvt0K7SA7IBK762lHz46n210rw7QKiWEqBL3utOUUXN4bUlk/wrVNTDcS+e0Uy kWOy1wIk/ekdX1gJbFoj1QhPwYDZL/+oZeNr+QqBXUefls4FPielGMNM4iLV+rqf1nBI 6kLR/I7+iqde0yGrlScHVI7b2WBc+regzdzNrYbDkFWsuqBQx8A60A/cj+b5y3KZhDd1 WggDi9JACFZNXFWgnylkmI21oPmR8dLpA8T/Nl+mDV0vdQedavfZumtqhSJvOnsiWL0+ +Em3z5k/gjcO0MImgiXu9NREMxW4saXQdC9cY/grmR4mJD484K3kGzVT9JSCOBvkH6uJ KFjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MmU1HG2iYGV6JEeDyyVDdrnq6JazLk/+ZHGeiYN3Id8=; b=OvWl92EWfORGtGZ/jNFI1EppMiq3SNL2MPfigjSWZB/+XNbXti6RDdx5AFzrPhRqh9 jbzmqL7l2+nSyzmFVQ0geB+g6AK5BqTH81E8qGfe7Js9J3Va5S+oSihoArrx8MioAwNd LUOJpuzygB0iJ2RZTodK+fyb0FY4Jqlu3oZTKlSSYhc1mKAkpKWg4vVK+gVG2vkm/2Bx J9T1/Z1N6X0+Bqb5vl/vU1Zo3ulcR3ruEZG3jnPW3V1vPBtEtojOdzD20xtdbtwIUGNe H5/l9c8sm4qfc0LVAETkPrDLoTeaK4MtYmDY5Xf4oKvMQ+4F6aQ9ReA+7MPaLKzFLPmO mcOA== X-Gm-Message-State: AOAM530xUlQXaJFnVxw3YLKg3HZtFIvWDS6f4GxqKK4uMo2HD1cERwdx J0stF93jijhB2LmUCaFAREuBLQ== X-Received: by 2002:a05:651c:211d:: with SMTP id a29mr26605525ljq.115.1625785410259; Thu, 08 Jul 2021 16:03:30 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id p8sm309904lfc.185.2021.07.08.16.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 16:03:29 -0700 (PDT) From: Dmitry Baryshkov To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH] drm/bridge/lontium-lt9611uxc: fix provided connector suport Date: Fri, 9 Jul 2021 02:03:29 +0300 Message-Id: <20210708230329.395976-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 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: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" - set DRM_CONNECTOR_POLL_HPD as the connector will generate hotplug events on its own - do not call drm_kms_helper_hotplug_event() unless mode_config.funcs pointer is not NULL to remove possible kernel oops. Fixes: bc6fa8676ebb ("drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index 3cac16db970f..010657ea7af7 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -167,9 +167,10 @@ static void lt9611uxc_hpd_work(struct work_struct *work) struct lt9611uxc *lt9611uxc = container_of(work, struct lt9611uxc, work); bool connected; - if (lt9611uxc->connector.dev) - drm_kms_helper_hotplug_event(lt9611uxc->connector.dev); - else { + if (lt9611uxc->connector.dev) { + if (lt9611uxc->connector.dev->mode_config.funcs) + drm_kms_helper_hotplug_event(lt9611uxc->connector.dev); + } else { mutex_lock(<9611uxc->ocm_lock); connected = lt9611uxc->hdmi_connected; @@ -339,6 +340,8 @@ static int lt9611uxc_connector_init(struct drm_bridge *bridge, struct lt9611uxc return -ENODEV; } + lt9611uxc->connector.polled = DRM_CONNECTOR_POLL_HPD; + drm_connector_helper_add(<9611uxc->connector, <9611uxc_bridge_connector_helper_funcs); ret = drm_connector_init(bridge->dev, <9611uxc->connector,