Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp755195lqh; Thu, 28 Mar 2024 15:50:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxgHknpJeCkBwHraa+RNSLK6hLcmVGmnYkVwZ/RBtyAPn2OKIzjiE1BcK34/fQLjksO+9z2XMyHs5gJBWXF61yEoeQKCMG4r6qlK9/vQ== X-Google-Smtp-Source: AGHT+IE0sbcD6zHFByJGKtl/M/lAVgIaNcPG2oi73Ir3xQMPitekq4YBLPdWksZJiLM/ou+bavDx X-Received: by 2002:a05:6a21:9214:b0:1a3:9f87:f389 with SMTP id tl20-20020a056a21921400b001a39f87f389mr667081pzb.38.1711666225737; Thu, 28 Mar 2024 15:50:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711666225; cv=pass; d=google.com; s=arc-20160816; b=D7cpGkxo6u3QAa+fh0N8JHHANLuNoykBgU6ldjugEqACJb1Mp4jNAXTGrR/nTpPRl9 Idr6C+WOdTse01OKJztvzRn21Cvbfw9VeYE9qeDZQZFUI3qVkxZ7Oh7fT6c2K1kUwbG+ JYBzirwqgm13KHB99djJgmQm+Qh6p5c82yMjHf6ngRv2qSesl6DhWbL1ettDSGsrrD79 8SLZM33GtwkaGqhPsHN3mtcxO89U6H7izRi99sQJQUptE14aqe4Bmza8kyBY7GZbMFDi SRLyRDMj+XZ19JXl7B1CgTaOs7lXGMVufTRrKtYuMAo5kQQzjplLqTM81Qd2/efRyeK4 8/Mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=jaQuR2VabRjZ0oAgjAGPW//AvQ63fYK7rByYxplN6rc=; fh=ExCBLc7u+E+9nDgWe2qh8X2U6QDrSXB4WF5sNqPdcWg=; b=FykmSPZDrHxJwF+jIoFOP5iwtVx/CY1yITijnp63t32QWeUAabwMYChG9WcnFPpzQV 6b9VTW1p5uXx2WoX7Xuaemk1JGKsLYExI8YsjQTEsNpPGq/9zeHKE74Np7ycWWIRPLAk qRvuP0/KfBCbGmYzW1M89GYUrfV0KGRu86KmtQpg3Iczs0T1Z6ArWqRQTVjwwzzQaY5g Z8wtjEdvmJf4sfkbsD7qU0ue46xdC/80b3Nfv0KErbRSZZZCq4SXOdhgSGf5T1a3lz03 VvlTwwtAmKLl+qq3UCcFLAwXsQUXDkOJ85wQEfORy3wiKf8SS4d0uOeFX2aDGpbngJn1 CRdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vT99pGml; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-123788-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id pb12-20020a17090b3c0c00b002a20413875dsi2453354pjb.77.2024.03.28.15.50.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 15:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123788-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vT99pGml; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-123788-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D358294A40 for ; Thu, 28 Mar 2024 22:50:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35BC540869; Thu, 28 Mar 2024 22:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vT99pGml" Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 D91B617C9 for ; Thu, 28 Mar 2024 22:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711666216; cv=none; b=SK/E/MaNQunxE7qMDFtVQaOb1ggjLBD7pcgz6dmObt3oCT5XR+QnlMHCJojzZw6ly8Ihj0oZ9MPgVbGF13ZnhcpLPcxBEApl43zjcROh3yEcwG8ubwD5hyX/vkhi1YnYO0X/5BVvJrc835h4aMf1G+4SkUxPy33c+0qOLTCB6FU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711666216; c=relaxed/simple; bh=yoP3sHjaI3AmvFwFYVJ+C+MxnU497kh1zCU4RdsuJCQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ed7jBE/sXFHiC0N4lxhjxcv5tiSZCQylnap136cP8kgowmStMKlK2imSZYWazpZoA+fdlayZQFYtBpUHDysOYE3vmve54pJiza+UBAvu2CnHRk6iz7/M+gdbVC3Xykr7y6zguhe8AHXANwQVNoSizp9IseOHpnE4bEKdMTSDAGA= 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=vT99pGml; arc=none smtp.client-ip=209.85.219.169 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 Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dcbef31a9dbso1107121276.1 for ; Thu, 28 Mar 2024 15:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711666214; x=1712271014; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jaQuR2VabRjZ0oAgjAGPW//AvQ63fYK7rByYxplN6rc=; b=vT99pGmlKH1qv0sxpDso4yGuqA2YUgJshoGdNnWXoTXgQdmTEKwW+OLSkuOsJHmGdM ENl9Vd0tGa3pGXL3mcmnV4juLMxcNHJcnqpSqx1ByV+7ZBFuRNYMtKXmLx8rW49mCZqZ nkeymtRLxhpFozOidor2/8gn7tNpMvgEOrZKfY09JQ+WIpMGkRK0t0TU1uxw6OAIUGhY JVKLe3Mqz4J1+yjp0xpuQlPuCxbQI6XDSk6Uxbug4fC5hv64xxMToanKXxcSmpDvDWxC liwPvSMmjBQThqyzKN74MXZ//pn/2ocg0hfZ2PeMSY8XkdCffSdNAyn2qURXhgKwre3m K0Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711666214; x=1712271014; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jaQuR2VabRjZ0oAgjAGPW//AvQ63fYK7rByYxplN6rc=; b=T3dpyYwgfxX65+KrIvJZ70zDYcK/4lTL2TKEvpMQGJQWm+kOCKBAVrMBoi+q0AFdvM b0b2D/Py+M+3STyWrXQgPgiFeoBFXgR7Hl/ZMXylMXekxb76xhw9In4HWJeKIjNcQ9AD S6kf/f06ISh86nWPdwBgxpAlA1J0rkdZdF2dAeqczmopfmFf84z6/IUBp5Q8WL682RHx 0VptswcNeC9y3W7KXB5G552wKOl6Y9RMoX2KMO9fHOphnhU5LYa6wvuVoqfYBa5Tqeai C7dYURLoPOfr7xYCA+ql0Deygkne7v3R+VdXrtNIiEtqCC4ANCnT0BPF1qs3PnyqFlIj GEbA== X-Forwarded-Encrypted: i=1; AJvYcCWW5dxMqgwYqJQRSv8+VhnWkk9YoFUhM5g7yOfDJNNBNzaNJRUF5Ew4kJrVbfeZ5X6NKWcfJqBfrdwvYpm51ooSNJU0tCBsiS7nG6MM X-Gm-Message-State: AOJu0YwrZLbz+fE0X9997LBe/QNU6WDjkegeLedW+2wwC/YcGDpeQDxm uL3KRqmcbJHlwBnRC3z6RqwHfC53x7wlr7e8/ush3XhwHfYT0OHHHaJxBxJZVmeKg6MuIJCDh6y j2/tqLeI07KeuPk2r4CgOjMa2bpgXPUDHhi0yUA== X-Received: by 2002:a25:2188:0:b0:dda:bf8c:f278 with SMTP id h130-20020a252188000000b00ddabf8cf278mr702978ybh.47.1711666213923; Thu, 28 Mar 2024 15:50:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1711656246-3483-1-git-send-email-quic_khsieh@quicinc.com> <1711656246-3483-2-git-send-email-quic_khsieh@quicinc.com> <55debb0a-c7af-ef71-c49a-414c7ab4f59d@quicinc.com> <23de89e9-3ef3-c52d-7abf-93dc2dbb51a4@quicinc.com> In-Reply-To: <23de89e9-3ef3-c52d-7abf-93dc2dbb51a4@quicinc.com> From: Dmitry Baryshkov Date: Fri, 29 Mar 2024 00:50:02 +0200 Message-ID: Subject: Re: [PATCH v1] drm/msm/dp: use dp_hpd_plug_handle() and dp_hpd_unplug_handle() directly To: Abhinav Kumar Cc: Stephen Boyd , Bjorn Andersson , Johan Hovold , Kuogee Hsieh , abel.vesa@linaro.org, agross@kernel.org, airlied@gmail.com, daniel@ffwll.ch, dianders@chromium.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Thu, 28 Mar 2024 at 23:21, Abhinav Kumar wrote: > > > > On 3/28/2024 1:58 PM, Stephen Boyd wrote: > > Quoting Abhinav Kumar (2024-03-28 13:24:34) > >> + Johan and Bjorn for FYI > >> > >> On 3/28/2024 1:04 PM, Kuogee Hsieh wrote: > >>> For internal HPD case, hpd_event_thread is created to handle HPD > >>> interrupts generated by HPD block of DP controller. It converts > >>> HPD interrupts into events and executed them under hpd_event_thread > >>> context. For external HPD case, HPD events is delivered by way of > >>> dp_bridge_hpd_notify() under thread context. Since they are executed > >>> under thread context already, there is no reason to hand over those > >>> events to hpd_event_thread. Hence dp_hpd_plug_handle() and > >>> dp_hpd_unplug_hanlde() are called directly at dp_bridge_hpd_notify(). > >>> > >>> Signed-off-by: Kuogee Hsieh > >>> --- > >>> drivers/gpu/drm/msm/dp/dp_display.c | 5 +++-- > >>> 1 file changed, 3 insertions(+), 2 deletions(-) > >>> > >> > >> Fixes: 542b37efc20e ("drm/msm/dp: Implement hpd_notify()") > > > > Is this a bug fix or an optimization? The commit text doesn't tell me. > > > > I would say both. > > optimization as it avoids the need to go through the hpd_event thread > processing. > > bug fix because once you go through the hpd event thread processing it > exposes and often breaks the already fragile hpd handling state machine > which can be avoided in this case. Please add a description for the particular issue that was observed and how it is fixed by the patch. Otherwise consider there to be an implicit NAK for all HPD-related patches unless it is a series that moves link training to the enable path and drops the HPD state machine completely. I really mean it. We should stop beating a dead horse unless there is a grave bug that must be fixed. > > >> > >> Looks right to me, > >> > >> Reviewed-by: Abhinav Kumar -- With best wishes Dmitry