From patchwork Tue May 25 00:01:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12277329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2AA8C2B9F7 for ; Tue, 25 May 2021 00:02:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E15D6141B for ; Tue, 25 May 2021 00:02:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E15D6141B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 29FA56E99B; Tue, 25 May 2021 00:02:57 +0000 (UTC) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 908246E99C for ; Tue, 25 May 2021 00:02:52 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id cu11-20020a17090afa8bb029015d5d5d2175so12186505pjb.3 for ; Mon, 24 May 2021 17:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/T35r9H/xYdI5Daj3afSSqWpMxR8pN+3BRmstBRd2eo=; b=XtJTTLAFoWjzdg0MeNYuiQac377tNakIga9O2eo1eKTa8+hf0jzBkj7TfYpMGXT/9c yWVh9Bqh6rd4c6lQvUcja9C8SSi70125WPI0n8Z+OZqxjVDyPZZZarT+YdaE/J5/4EI0 QChngXtryr++KD3aFI4F4hISiVpW27jfctnlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/T35r9H/xYdI5Daj3afSSqWpMxR8pN+3BRmstBRd2eo=; b=eDmuv3xOONxhK78wJnh1FiM9Tay+qtR4iEZNqLFqiHLWa3HoJNmTiT7ZIDQsCBvEE0 +f9/XeoagzlZ5AIArAD8f+AYaQ2+HWdsRa8MpKxlIoMX9/Q1hP40/TYdaZz0qB1TTP53 kQQGkZ5Q5vi6fZydSzRJ7WmKtypnKKpNySNmuX4IpMV6fQdr1p41kLsjx0iM+qXHwyM9 GncnKNDCOlH9JvcYvbceM+SSeBRIbCEpwSVgJpFPDfVvt0YwzVfpXUsxpN/JeUURMVZI ru37FPu6f8F4+7MP0jK5pnvyyEBbzhHMy8Evj+eiK+Zw0wnTsCj9hTup+SDi7h2l9SEx dj5A== X-Gm-Message-State: AOAM530O3pcnIS47LoYQCbv2Fznv4CKqZOMLPqUMKI2JhDqK8SrTOTZZ pKF0LuGT9W4nCwEjLJPYjAlxQw== X-Google-Smtp-Source: ABdhPJygsw79I/6gDgsXc111IivaKqoEq603iWbw3jkbei76BrFXoUYpIE1evcNNxFoe9oHbDOi/Mw== X-Received: by 2002:a17:903:2312:b029:f0:cd8e:c843 with SMTP id d18-20020a1709032312b02900f0cd8ec843mr27708566plh.6.1621900972211; Mon, 24 May 2021 17:02:52 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:26d1:4df0:7cdf:ce13]) by smtp.gmail.com with ESMTPSA id f18sm10696741pjh.55.2021.05.24.17.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 17:02:51 -0700 (PDT) From: Douglas Anderson To: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Sam Ravnborg Subject: [PATCH v8 09/11] drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus Date: Mon, 24 May 2021 17:01:57 -0700 Message-Id: <20210524165920.v8.9.Ib5fe0638da85800141ce141bb8e441c5f25438d4@changeid> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog In-Reply-To: <20210525000159.3384921-1-dianders@chromium.org> References: <20210525000159.3384921-1-dianders@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robdclark@chromium.org, Jernej Skrabec , David Airlie , linux-arm-msm@vger.kernel.org, Douglas Anderson , Steev Klimaszewski , Bjorn Andersson , Stanislav Lisovskiy , dri-devel@lists.freedesktop.org, Stephen Boyd , Thierry Reding , linux-kernel@vger.kernel.org, Robert Foss Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We want to provide our panel with access to the DP AUX channel. The way to do this is to let our panel be a child of ours using the fancy new DP AUX bus support. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Reviewed-by: Lyude Paul --- (no changes since v7) Changes in v7: - Patch to support for DP AUX bus on ti-sn65dsi86 new for v7. drivers/gpu/drm/bridge/Kconfig | 1 + drivers/gpu/drm/bridge/ti-sn65dsi86.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 7e7f28eb9546..a82952a85db4 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -292,6 +292,7 @@ config DRM_TI_SN65DSI86 select DRM_PANEL select DRM_MIPI_DSI select AUXILIARY_BUS + select DRM_DP_AUX_BUS help Texas Instruments SN65DSI86 DSI to eDP Bridge driver diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 1ea07d704705..5263206792f6 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1448,19 +1449,27 @@ static int ti_sn_aux_probe(struct auxiliary_device *adev, pdata->aux.transfer = ti_sn_aux_transfer; drm_dp_aux_init(&pdata->aux); + ret = devm_of_dp_aux_populate_ep_devices(&pdata->aux); + if (ret) + goto err; + /* * The eDP to MIPI bridge parts don't work until the AUX channel is * setup so we don't add it in the main driver probe, we add it now. */ ret = ti_sn65dsi86_add_aux_device(pdata, &pdata->bridge_aux, "bridge"); + if (ret) + goto err; + + return 0; +err: /* * Clear of_node on any errors. Really this only matters if the error * is -EPROBE_DEFER to avoid (again) keep pinctrl from claiming when * it tries the probe again, but it shouldn't hurt on any error. */ - if (ret) - adev->dev.of_node = NULL; + adev->dev.of_node = NULL; return ret; }