Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2684030rwb; Sun, 4 Sep 2022 22:44:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR7VDN0Qtl7f6+pkFz5RZZikoMnvz4/G3iuEnvCqD4AdXW5TBUhMMZPtzfLsvmTK2dzqpYVV X-Received: by 2002:a17:907:9710:b0:731:67b1:dc3b with SMTP id jg16-20020a170907971000b0073167b1dc3bmr35447440ejc.709.1662356649389; Sun, 04 Sep 2022 22:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662356649; cv=none; d=google.com; s=arc-20160816; b=f81o7tnlPuvsJp/pvyPaXAQB4Y2tMFx2M4g/RDMolQT+/Q+vkWYszwa7fvfFYdic1S 9M7o2i00gN7wboNedTm1SBSxnrZwwspBtKUcePUBHp+dxdrIbVGeV95LaSVOCh0W6V91 4Wxnh3SnvHgP4YUIcLPDSpDXppu0tAm+IqGBrq2aQuE1fVUZsufU7JRutj6zbomQW59s hhhzqn54FM5ASfzMCemIRH+FOj4/slllWd+0ns2BWlhBPw1xzQnQec07EVI1F6m+dr8+ Ia/YsvbtQtEd2BeTgkjsVmvHMwkpS7RZi+q3AaBvMkqfJEMVGK2WC5ga8Klu2z+TfmS0 JCJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=cUKV/7JWE/DScSFwrZ0bZUs1hUlhe3dy27wynPZ63Oo=; b=XorHF9r39mkCCrYGipUf0uX1pSOLu4BMzBYHbdSEXwX8LEYz6f35nS9gfiHeE6S+F/ R4U/Osof2U0nymNUaKcy5OJ24VVzrbYWdTbOSCs3VFC+PrpBHdDJuTBOnqzmMn1coYRf J72VZeFiC4j/t1CyXf2HmF6ESqdWlFQdV5QdKQeePriIrT8zOPequOeXUnfP59tOOJyq uqMvSiIhQ9jjhwLsxD9yMBH+FAgHFjgItmSTK6nFTwmgwjJ8GaJqZoFLbQiVrmSUjU40 Uoell82hLJnOGuEtv3uOejh9sCzgA35XRMS2EJyI0FR3tcElvDTgIO18ISA+cU+U9crF yzxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JnCPhrOP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a056402248400b0044e6a188fb8si2690127eda.77.2022.09.04.22.43.44; Sun, 04 Sep 2022 22:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JnCPhrOP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231883AbiIEF0Y (ORCPT + 99 others); Mon, 5 Sep 2022 01:26:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiIEF0W (ORCPT ); Mon, 5 Sep 2022 01:26:22 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0774020F4C for ; Sun, 4 Sep 2022 22:26:20 -0700 (PDT) Received: from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 907904A8; Mon, 5 Sep 2022 07:26:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1662355578; bh=ZIS2sM0JMabntCUeGgPWf0WOLHcnI9Ueru0gCH+S8nU=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=JnCPhrOPzgFDbSXtD6F0N85Uu0vyiPgT3KxgixdgJev/8S8bx+ZAY0I4rvXXmaqPi 7FbZTzdOr9Ss6Qe5IyExtSynBnGhRtyS3RalePMWE8xyfsZrtVXRzkcas+Gk0WY4qI WNM3Jrmt3p434wSI8480yo/h0MY1BkBkxX1MZc/o= Message-ID: Date: Mon, 5 Sep 2022 08:26:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] drm/bridge_connector: enable HPD by default if supported Content-Language: en-US From: Tomi Valkeinen To: Kieran Bingham , Laurent Pinchart , Nikita Yushchenko Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jacopo Mondi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20211225063151.2110878-1-nikita.yoush@cogentembedded.com> <164563304251.4066078.10022034509552549983@Monstersaurus> <164563575394.4066078.17104997030535169083@Monstersaurus> <7163f30b-6496-5762-0d9d-96834fb7452d@ideasonboard.com> In-Reply-To: <7163f30b-6496-5762-0d9d-96834fb7452d@ideasonboard.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/08/2022 16:02, Tomi Valkeinen wrote: > Hi, > > On 23/02/2022 19:02, Kieran Bingham wrote: >> Quoting Laurent Pinchart (2022-02-23 16:25:28) >>> Hello, >>> >>> On Wed, Feb 23, 2022 at 04:17:22PM +0000, Kieran Bingham wrote: >>>> Quoting Laurent Pinchart (2021-12-29 23:44:29) >>>>> On Sat, Dec 25, 2021 at 09:31:51AM +0300, Nikita Yushchenko wrote: >>>>>> Hotplug events reported by bridge drivers over >>>>>> drm_bridge_hpd_notify() >>>>>> get ignored unless somebody calls drm_bridge_hpd_enable(). When the >>>>>> connector for the bridge is bridge_connector, such a call is done >>>>>> from >>>>>> drm_bridge_connector_enable_hpd(). >>>>>> >>>>>> However drm_bridge_connector_enable_hpd() is never called on init >>>>>> paths, >>>>>> documentation suggests that it is intended for suspend/resume paths. >>>>> >>>>> Hmmmm... I'm in two minds about this. The problem description is >>>>> correct, but I wonder if HPD should be enabled unconditionally >>>>> here, or >>>>> if this should be left to display drivers to control. >>>>> drivers/gpu/drm/imx/dcss/dcss-kms.c enables HPD manually at init time, >>>>> other drivers don't. >>>>> >>>>> It feels like this should be under control of the display controller >>>>> driver, but I can't think of a use case for not enabling HPD at init >>>>> time. Any second opinion from anyone ? >>>> >>>> This patch solves an issue I have where I have recently enabled HPD on >>>> the SN65DSI86, but without this, I do not get calls to my >>>> .hpd_enable or >>>> .hpd_disable hooks that I have added to the ti_sn_bridge_funcs. >>>> >>>> So it needs to be enabled somewhere, and this seems reasonable to me? >>>> It's not directly related to the display controller - as it's a factor >>>> of the bridge? >>>> >>>> On Falcon-V3U with HPD additions to SN65DSI86: >>>> Tested-by: Kieran Bingham >>> >>> If you think this is right, then >>> >>> Reviewed-by: Laurent Pinchart >> >> I do, and at the very least it works for me, and fixes Nikita's issue so >> to me that's enough for: > > So who disables the HPD now? > > Is the drm_bridge_connector_enable_hpd & > drm_bridge_connector_disable_hpd documentation now wrong as they talk > about suspend/resume handlers? To give more context, currently omapdrm enables the HPDs at init time and disables them at remove time. With this patch, the HPDs are enabled twice, leading to a WARN. imx and msm drivers also seem to call drm_bridge_connector_enable_hpd(), so I would guess those also WARN with this patch. Afaics, this patch alone is broken, as it just disregards the drivers that already enable the HPD, and also as it doesn't handle the disabling of the HPD, or give any guidelines on how the drivers should now manage the HPD. My suggestion is to revert this one. Tomi