From patchwork Fri Mar 11 01:49:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 12777221 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 462D8C433EF for ; Fri, 11 Mar 2022 01:50:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5E8010E639; Fri, 11 Mar 2022 01:50:24 +0000 (UTC) Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD99810E11E; Fri, 11 Mar 2022 01:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646963422; x=1678499422; h=from:to:cc:subject:date:message-id:mime-version; bh=cS/SqvnKsmJnfQ3x/xNTX3q2pApixpQtTrW6cBTKVSM=; b=cCl/CNxe2mLtwYXqavwMOHriqf+8dZH1f/+Bg81VQGsMLk1Mazq6ecs8 qk6J9EaAYcT3jkzA3IVShQFANZ+Ge6FR54hy/bqRJnxpDDS9XEfuTKLzG DvKY53yczCJuK+6WZSjCWQwZYq1/cQOnQ4lWlubUrPIcAkYVN/pfswCSB A=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 10 Mar 2022 17:50:22 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 17:50:21 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 10 Mar 2022 17:50:21 -0800 Received: from abhinavk-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 10 Mar 2022 17:50:20 -0800 From: Abhinav Kumar To: Subject: [PATCH 0/6] Allow drm_writeback_connector to accept pointer to drm_encoder Date: Thu, 10 Mar 2022 17:49:54 -0800 Message-ID: <1646963400-25606-1-git-send-email-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) 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: hamohammed.sa@gmail.com, suraj.kandpal@intel.com, emma@anholt.net, rodrigosiqueiramelo@gmail.com, jani.nikula@intel.com, liviu.dudau@arm.com, Abhinav Kumar , swboyd@chromium.org, melissa.srw@gmail.com, nganji@codeaurora.org, seanpaul@chromium.org, laurent.pinchart@ideasonboard.com, dmitry.baryshkov@linaro.org, james.qian.wang@arm.com, quic_aravindh@quicinc.com, mihail.atanassov@arm.com, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There are some vendor drivers for which the writeback encoder shares hardware resources such as clocks and interrupts with the rest of the display pipeline. In addition, there can be use-cases where the writeback encoder could be a shared encoder between the physical display path and the writeback path. To accommodate for such cases, change the drm_writeback_connector to accept a pointer to drm_encoder. For existing users of drm_writeback_connector there will not be any change in functionality due to this change. This approach was first posted by Suraj Kandpal here [1] for both encoder and connector. But after discussions [2], the consensus was reached to split this change for the drm_encoder first and the drm_connector part can be reworked in a subsequent change later. Validation of this change was done using igt_writeback tests on MSM based RB5 board using the changes posted here [3]. For all other chipsets, these changes were compile-tested. [1] https://patchwork.kernel.org/project/dri-devel/patch/20220202081702.22119-1-suraj.kandpal@intel.com/ [2] https://patchwork.kernel.org/project/dri-devel/patch/20220202085429.22261-6-suraj.kandpal@intel.com/ [3] https://patchwork.freedesktop.org/series/99724/ Abhinav Kumar (6): drm: allow real encoder to be passed for drm_writeback_connector drm/komeda: use drm_encoder pointer for drm_writeback_connector drm/vkms: use drm_encoder pointer for drm_writeback_connector drm/vc4: use drm_encoder pointer for drm_writeback_connector drm/rcar_du: use drm_encoder pointer for drm_writeback_connector drm/malidp: use drm_encoder pointer for drm_writeback_connector drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 4 +++- drivers/gpu/drm/arm/malidp_mw.c | 3 ++- drivers/gpu/drm/drm_writeback.c | 8 ++++---- drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 3 ++- drivers/gpu/drm/vc4/vc4_txp.c | 14 ++++++++++---- drivers/gpu/drm/vkms/vkms_writeback.c | 4 +++- include/drm/drm_writeback.h | 13 +++++++++++-- 7 files changed, 35 insertions(+), 14 deletions(-)