From patchwork Thu Feb 14 01:19:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10811527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD82313B5 for ; Thu, 14 Feb 2019 01:19:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A50E2DE0F for ; Thu, 14 Feb 2019 01:19:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EE1A2DE14; Thu, 14 Feb 2019 01:19:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CA2B2DE1F for ; Thu, 14 Feb 2019 01:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729724AbfBNBT2 (ORCPT ); Wed, 13 Feb 2019 20:19:28 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60384 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729690AbfBNBT2 (ORCPT ); Wed, 13 Feb 2019 20:19:28 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E819160988; Thu, 14 Feb 2019 01:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550107167; bh=J9R/9PPWYC37q+ECO6jlMK+fFNzRwmVZl3/T7pjfuws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IEFlygb9okWQmpfunlOBtrng2AlbhPE7o2Fj34iTvW7B82w5/hyYJualcO9mw50JX e1+r21sRkPO+8pNCtUeMcYqWXGyhmREPzEE2Rz9NZwl4pIKoz4i4VTv6tPfnU3a6su ReVELvWuvshtX25k8xz1rCyIFUWZ7irfdkLa5wCU= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9A18060909; Thu, 14 Feb 2019 01:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550107167; bh=J9R/9PPWYC37q+ECO6jlMK+fFNzRwmVZl3/T7pjfuws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IEFlygb9okWQmpfunlOBtrng2AlbhPE7o2Fj34iTvW7B82w5/hyYJualcO9mw50JX e1+r21sRkPO+8pNCtUeMcYqWXGyhmREPzEE2Rz9NZwl4pIKoz4i4VTv6tPfnU3a6su ReVELvWuvshtX25k8xz1rCyIFUWZ7irfdkLa5wCU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9A18060909 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Jeykumar Sankaran , seanpaul@chromium.org, robdclark@gmail.com, hoegsberg@google.com Subject: [PATCH v2 4/7] drm/msm/dpu: dont use encoder->crtc in atomic path Date: Wed, 13 Feb 2019 17:19:13 -0800 Message-Id: <1550107156-17625-5-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1550107156-17625-1-git-send-email-jsanka@codeaurora.org> References: <1550107156-17625-1-git-send-email-jsanka@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP encoder->crtc is not really meaningful for atomic path. Use crtc->encoder_mask to identify the crtc attached with an encoder. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 45617b9..0a19124 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -961,6 +961,7 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, struct dpu_kms *dpu_kms; struct list_head *connector_list; struct drm_connector *conn = NULL, *conn_iter; + struct drm_crtc *drm_crtc; struct dpu_rm_hw_iter pp_iter, ctl_iter; struct msm_display_topology topology; struct dpu_hw_ctl *hw_ctl[MAX_CHANNELS_PER_ENC] = { NULL }; @@ -992,10 +993,14 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, return; } + drm_for_each_crtc(drm_crtc, drm_enc->dev) + if (drm_crtc->state->encoder_mask & drm_encoder_mask(drm_enc)) + break; + topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); /* Reserve dynamic resources now. Indicating non-AtomicTest phase */ - ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, drm_enc->crtc->state, + ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, drm_crtc->state, topology, false); if (ret) { DPU_ERROR_ENC(dpu_enc,