Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35097594rwd; Mon, 10 Jul 2023 02:28:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6FINRd92TCgZg0NYZ+wrG78cRqFCARrzlYgEXy8oq10GTNPG6CDcFPeN6JnQ2xrYvpNVx X-Received: by 2002:a05:6808:1250:b0:3a3:94f4:adca with SMTP id o16-20020a056808125000b003a394f4adcamr12805297oiv.2.1688981337068; Mon, 10 Jul 2023 02:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688981337; cv=none; d=google.com; s=arc-20160816; b=UZJd2XPCpqCcsRJup0mBAskDvRsOeOW3y/fTA1nlNqbVNZJTOoMOXdnJKaZxD2M/Dl U/bmelkJMp1Hy5d66PqppkTtJY4w+Yea+26MlyZFxV9AmgxDq8fodGLzaUp05jT7aN5n 69FdXQvL+8dY8XA5RgE5RFvb6WRaCAv1Bnmy9I6bU6H9cQ5+dM9casSX9dWVLJPVFC5R vqI9UebZbKjrCYtLMgsgSzJ/V5tpHkUe3wwHHBnZFJglA0AcW1WzUNZzd8Ucrf739YXx yzjW1CPPCZU8oBMeKpggA82jfyNbTKLIRUgsLGnlvj/e3bcxlstnFJgAWz9+A+22KjR9 X7iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+G6rw6Lzr4S57ts7YP1ylMlTPk8hLpi7yHWyU7B67Pk=; fh=UWzJOSVkeahw58LAo8I8udpg08360vHK6zT/LVneSs0=; b=qy4nqU7df0ifdd7ZpSyNg5qdChQRZK9+yR0yM6yeScATmILdEP8kwZQ2u0YPhZRWhJ BKAsDoBPfqYGYO3kncf69C2Exx6ahHPNbBGB1q4jEuOKWajZ6ENaIUSUeOvK3tQJUKIh B2SJ/8IHQjlFWH92pJb/jKyWa7Jhbz402SRTvjFczjf/b6U4To+SppW79sNtAq+TPdCt s1N1Yh8opnHx96SysWkQHJVIiV7Qa44sbuMyr/S5DiBbtKpWm2x2UEs4uB6SdcPEB90u 6t/BTDajdkKH67OCP9CkaktdECiPT94BFG1mqbiErT2ymdx+h5G7Xl83acZtmLMV3C20 Dkvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WA5KTELE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a63594f000000b00550e8b1ebc1si8914780pgm.339.2023.07.10.02.28.45; Mon, 10 Jul 2023 02:28:57 -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 header.i=@chromium.org header.s=google header.b=WA5KTELE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbjGJJK5 (ORCPT + 99 others); Mon, 10 Jul 2023 05:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231356AbjGJJKu (ORCPT ); Mon, 10 Jul 2023 05:10:50 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76FA4127 for ; Mon, 10 Jul 2023 02:10:49 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3a1ebb79579so3263154b6e.3 for ; Mon, 10 Jul 2023 02:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688980248; x=1691572248; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+G6rw6Lzr4S57ts7YP1ylMlTPk8hLpi7yHWyU7B67Pk=; b=WA5KTELETcwWf6w/I55emKwkPdPD6iqH5cMo+ztoYJPOEhyW0/lxNunr71IJJgEdb0 2BuAPcAN8UtUjVLClL3O/XIk22Ql1QD0X5B5mVXbPp4K8te5CPBCi5/r5a9c/0yAbs0M TXWfi6YXFEVwT9ToCZShEm1GhLQTa1PFXALAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688980248; x=1691572248; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+G6rw6Lzr4S57ts7YP1ylMlTPk8hLpi7yHWyU7B67Pk=; b=BNCknR9mbVHnsaI0VnUjNW9ZZh5H+Pm5UHJkSrv/WTAVtRMpu27tUFX4K5jH18hodX txt5SGdcjDnSUwfteFqEJweBKIjxaPQlbEbSjCqG7pqiupoMcgbpLO8oOLbjopFdsOyD DxHXlsSsrZirWAOMu0y5dDucS61ngliT/Q6zjWX6R/MTF/v4zQn274gcKHQ5Drzyu01Y 3kaRXrP6RjOjXbaPSWwNXjcMUOxTXsNNoYn0Mtd/mimzhbuLOU0B00yiUIQVRGork14a qbkvAAb0hZlerOtncMLaRc1WG+IAbnudYmYHQHfb0RKGQ9pRmIkC4KblftbRXENfd+iW GfoQ== X-Gm-Message-State: ABy/qLbr2fNH9e2k3jr7UBahtBAKcwRCqXNUe8ButecrFnTk9rHksUtC enKD1rn0l/2N2oOyhTw6RQQfxA== X-Received: by 2002:a05:6358:52ca:b0:135:3f00:b8de with SMTP id z10-20020a05635852ca00b001353f00b8demr11516209rwz.17.1688980248710; Mon, 10 Jul 2023 02:10:48 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:be97:1d05:f9b6:36a6]) by smtp.gmail.com with ESMTPSA id w27-20020a637b1b000000b0053f06d09725sm6997574pgc.32.2023.07.10.02.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 02:10:48 -0700 (PDT) From: Chen-Yu Tsai To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Xin Ji , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] drm/bridge: anx7625: Use common macros for DP power sequencing commands Date: Mon, 10 Jul 2023 17:09:27 +0800 Message-ID: <20230710090929.1873646-1-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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 The DRM DP code has macros for the DP power sequencing commands. Use them in the anx7625 driver instead of raw numbers. Fixes: 548b512e144f ("drm/bridge: anx7625: send DPCD command to downstream") Fixes: 27f26359de9b ("drm/bridge: anx7625: Set downstream sink into normal status") Signed-off-by: Chen-Yu Tsai Reviewed-by: NĂ­colas F. R. A. Prado --- Collected tags and rebased on v6.5-rc1. drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 8b985efdc086..9db3784cb554 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -931,8 +931,8 @@ static void anx7625_dp_start(struct anx7625_data *ctx) dev_dbg(dev, "set downstream sink into normal\n"); /* Downstream sink enter into normal mode */ - data = 1; - ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data); + data = DP_SET_POWER_D0; + ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data); if (ret < 0) dev_err(dev, "IO error : set sink into normal mode fail\n"); @@ -971,8 +971,8 @@ static void anx7625_dp_stop(struct anx7625_data *ctx) dev_dbg(dev, "notify downstream enter into standby\n"); /* Downstream monitor enter into standby mode */ - data = 2; - ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data); + data = DP_SET_POWER_D3; + ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data); if (ret < 0) DRM_DEV_ERROR(dev, "IO error : mute video fail\n"); -- 2.41.0.255.g8b1d071c50-goog