Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2040667pxu; Fri, 18 Dec 2020 04:12:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsXsozMCWGIJxqZCes3hcYL4WOuUkEag4wDdVHvofty8zbjcowfnlrNZQCj3icWgIWN8AV X-Received: by 2002:a17:906:378f:: with SMTP id n15mr3630490ejc.263.1608293553908; Fri, 18 Dec 2020 04:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608293553; cv=none; d=google.com; s=arc-20160816; b=X/+QhDg+ZFnZ7W1si4a5jEomoM3P+uXvx6AKwUXmnCx7HjZJdeUb4gZ6wh0WwaVIOj OOplO2OHV+18sz2Aoxs0heoF27yG76CFieneTqJAUQ3AxDeZL+JvCC2dzej671vjm7dD ezsYtnc3rtoRam4TcrQaL3e++Vh67oON/tp07JLythdqBLph7I2CqbT93b49VJ2PfXIA TzA/3guQkljlbGsncL88rXKXaY52dNBzJzps4IN0Di6+UCGJGUAal6wJVg5cMGYmcmaD yzZAAoyg4ndwYvyxDLEDTRhTMJTDmXoUqzCgPKlBIAZnG0X4/XYiPZDscOeiXZk+Dypd PKLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Z9VPuMSJSoUHqzMeVGbAE30IrKxI8APrsEWW8ZWta/c=; b=JOsuiWyCdxiDcI/W3ym4uihfgqMvyLxcOqAzZ2Gxps9Om9DJMjRNY+1gwhPFxa2NP1 l6Ed1Bm+P+Cv1hG5qGdlUWU1qAtPUO99MUBQu27eAyzIItek8NHR4lwFQOYdqeb7ayFK W14zdxVpXhjgIAklz6u9zMp5J1B6SUCI46XTm9tZZ/YbFu9zaYfeAWk8gJ2sBnGrfeG6 90xq7lVvMovNKg24iENpp1gCpv9STtOuSCTVaE+pqL50nCtv0VRob8OBUYi8qOPHRmAN dJd9MDO42wJQByzpBrwmJbjA5zYTOMPvX1g4pZPgWt/1Kyv4tMu4NO0ax2MsnZ85g9je PWtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=Jwh2Wpiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si4416971eji.436.2020.12.18.04.12.10; Fri, 18 Dec 2020 04:12:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=Jwh2Wpiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732680AbgLRLVo (ORCPT + 99 others); Fri, 18 Dec 2020 06:21:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728205AbgLRLVn (ORCPT ); Fri, 18 Dec 2020 06:21:43 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72C69C0617B0 for ; Fri, 18 Dec 2020 03:21:03 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id a6so1977567wmc.2 for ; Fri, 18 Dec 2020 03:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z9VPuMSJSoUHqzMeVGbAE30IrKxI8APrsEWW8ZWta/c=; b=Jwh2WpiuqTtq8IfgRyqIkz6FNAHeEn05Ct65f/ZAFEXaiuq2+Zdo8nJKvU8sQ+RFgy eWyRZ/dANLyHxjixnapLeiLAXU1HtgK956k8JebGtyN2i4I3itFeBe3BFCp2M8plyLve 3zku/R4re76JwoUX/OAUO6lrK4kaetW9UQlvSTLigUNfS7KuaJ5RCJZQzpeOo8SBYHPl YPfw2rlG6BnY530aQwyzK9S67fh6nG1+VdTFldGxQsN62Nik22sSQA/I4lKRjZJwuIFx 02g/bIgrVjWKqOZjFhy6aS4iUviUj+1gh5v3E1Z0kXbFfrMeC6bG6yHan6MlY8vRAqUc GTgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z9VPuMSJSoUHqzMeVGbAE30IrKxI8APrsEWW8ZWta/c=; b=g1ggNWTuYoE4ZkCM9qmlEv1oZMFO9+Mmil2q59hMrxGRxcTy1D1JLfRSDjtED6YrGT xD91q0UnGhpkGj6Xgd5ENb4wect4RTCUtbj1pH39pKypSjkTI9q98e+SykufadlTeWlO jGSykh+DgskkcbOQ3TKD/lqFXvObkaqX5ZLFQOmbNuxhmCFawj8M7DqC6pcjRv1HEImz K4M54rsSNM4KUrhMMcDrqWDCDTP/ItgOW9xh9wQPqxyZIi3bR9mC4npFmc8VMUpf5/r+ YntLpJX2RSkz+jCUlhum6INUmYTfSMBqQVeiMhTeeLIDIEIV6iZOwBguJWRLZi/5Ktla VFhQ== X-Gm-Message-State: AOAM530L3hFfUAGwr95V76bJoq9AtIVaJwGQ96ycyJCmrY5w9ZFrZFuy WMOW3hrJ0ESKfidDbSW/A+DGJueuWFW4xJgIEbHaiA== X-Received: by 2002:a1c:27c3:: with SMTP id n186mr3780670wmn.96.1608290462078; Fri, 18 Dec 2020 03:21:02 -0800 (PST) MIME-Version: 1.0 References: <20201210134648.272857-1-maxime@cerno.tech> <20201210134648.272857-3-maxime@cerno.tech> In-Reply-To: <20201210134648.272857-3-maxime@cerno.tech> From: Dave Stevenson Date: Fri, 18 Dec 2020 11:20:45 +0000 Message-ID: Subject: Re: [PATCH 02/15] drm/vc4: hdmi: Move hdmi reset to bind To: Maxime Ripard Cc: Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , Jason Cooper , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Linux Media Mailing List , Hans Verkuil , LKML , Mauro Carvalho Chehab , Thomas Gleixner , linux-rpi-kernel@lists.infradead.org, DRI Development , Dom Cobley Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime & Dom On Thu, 10 Dec 2020 at 13:46, Maxime Ripard wrote: > > From: Dom Cobley > > The hdmi reset got moved to a later point in the commit 9045e91a476b > ("drm/vc4: hdmi: Add reset callback"). > > However, the reset now occurs after vc4_hdmi_cec_init and so tramples > the setup of registers like HDMI_CEC_CNTRL_1 > > This only affects pi0-3 as on pi4 the cec registers are in a separate > block It does mean that this reset only happens once on bind rather than on every pre_crtc_configure, but as this really is the big reset the entire block I don't see it needing to be triggered on every configure. > Fixes: 9045e91a476b ("drm/vc4: hdmi: Add reset callback") > Signed-off-by: Dom Cobley > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 8006bddc8fbb..3df1747dd917 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -773,9 +773,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, > return; > } > > - if (vc4_hdmi->variant->reset) > - vc4_hdmi->variant->reset(vc4_hdmi); > - > if (vc4_hdmi->variant->phy_init) > vc4_hdmi->variant->phy_init(vc4_hdmi, vc4_conn_state); > > @@ -1865,6 +1862,9 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) > vc4_hdmi->disable_wifi_frequencies = > of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence"); > > + if (vc4_hdmi->variant->reset) > + vc4_hdmi->variant->reset(vc4_hdmi); > + > pm_runtime_enable(dev); > > drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS); > -- > 2.28.0 >