From patchwork Fri Jun 30 20:55:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 698327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABFF0EB64DD for ; Fri, 30 Jun 2023 20:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbjF3Uzc (ORCPT ); Fri, 30 Jun 2023 16:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbjF3Uza (ORCPT ); Fri, 30 Jun 2023 16:55:30 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8903C1B for ; Fri, 30 Jun 2023 13:55:29 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fb77f21c63so3720496e87.2 for ; Fri, 30 Jun 2023 13:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688158527; x=1690750527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JRCcVx5yqkWjx+j8HRIisuUziAvNRbEhBQXvfMXuZd8=; b=dwHqaivP2b/gXsHnHW7vkbtfxVbe49Hb9zrIEBPXG1Ncx6OeOfy459El6g2czd2pKK TSsaEcNP/Lq+jQ+ecjqJ5MnNbzheyVrW2G3ZLNozU1scW8NLXA+94h+jTMsdk41/q0Nx GdgBUyCBBkswa5cWMH3Yla0KDSuz620T58Z8BSbz0kbglSu75zrkGARwW2RCNjfqVPin t1WTCQm48lSqU9S9ffCJUL6vuPPdkAvwPytpItSbNdgIWlpXYz2cNuZaVFFrfVcF/7ip HtFonr+/zMxP/+r2m5U19/u4TsenXYZFEY3v62FFjviiCIf/wqF4Ll+LWC4QpttDMhT1 UJ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688158527; x=1690750527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JRCcVx5yqkWjx+j8HRIisuUziAvNRbEhBQXvfMXuZd8=; b=T9mrBQ/sIVNRflXQSO0pNhmZfpQ9SlvK3VBD0y5kqyPcEDdPmj9rQ35M3fB2mynlEt TLfR3JU7fPxSZmp7jVlvMj/ZV2/n6JESq+4WNq0fBxd5M7k03O1jpYNq76tGnqhbcaCe xaeOn1xCcIRdL/V5i2qxC6Yhm3HAlpjuUVS0NBJM4g6IoPTpGV0lYEpRimw/g5NenOkM hW30y3d+ppXtlJyTe7x9sBWq2FGazj+VaRmhxz/j1cV3gv6pxdr8rGjtmufd82EC1GFM 9QzLqoJXBEvsC0gMQTwHK1sBVJU98cDjR7m3/PGiE4GQThUw6pwn08nHjMSSZosFwvrn pzcQ== X-Gm-Message-State: ABy/qLZuM5+LLRQutWjV3HjZHRjI98owbNydkzwIsC1miKBR3ZnNO+0y pRz+ufuZAsjE39ctka6MZc0e6A== X-Google-Smtp-Source: APBJJlFrwSETAa2BKl29PSv3Sugxf4hqL7i6b4S84n/IKp26+gGQzHmAWreZQYniwwLbeTpdGnAq7Q== X-Received: by 2002:a05:6512:314b:b0:4fb:92a9:cbe8 with SMTP id s11-20020a056512314b00b004fb92a9cbe8mr2813814lfi.18.1688158527281; Fri, 30 Jun 2023 13:55:27 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id z11-20020ac25deb000000b004fb75943aa0sm2252168lfq.196.2023.06.30.13.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 13:55:26 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 04/15] drm/msm/hdmi: switch to atomic_pre_enable/post_disable Date: Fri, 30 Jun 2023 23:55:12 +0300 Message-Id: <20230630205523.76823-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230630205523.76823-1-dmitry.baryshkov@linaro.org> References: <20230630205523.76823-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In preparation of reworking the HDMI mode setting, switch pre_enable and post_disable callbacks to their atomic variants. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index fbcf4dd91cd9..f9293f7d8f34 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -128,7 +128,8 @@ static void msm_hdmi_config_avi_infoframe(struct hdmi *hdmi) hdmi_write(hdmi, REG_HDMI_INFOFRAME_CTRL1, val); } -static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge) +static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; @@ -154,7 +155,8 @@ static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge) msm_hdmi_hdcp_on(hdmi->hdcp_ctrl); } -static void msm_hdmi_bridge_post_disable(struct drm_bridge *bridge) +static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; @@ -291,8 +293,13 @@ static enum drm_mode_status msm_hdmi_bridge_mode_valid(struct drm_bridge *bridge } static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = { - .pre_enable = msm_hdmi_bridge_pre_enable, - .post_disable = msm_hdmi_bridge_post_disable, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + + .atomic_pre_enable = msm_hdmi_bridge_atomic_pre_enable, + .atomic_post_disable = msm_hdmi_bridge_atomic_post_disable, + .mode_set = msm_hdmi_bridge_mode_set, .mode_valid = msm_hdmi_bridge_mode_valid, .get_edid = msm_hdmi_bridge_get_edid,