Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp52943rbe; Wed, 28 Feb 2024 11:48:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWZrDcModbMRUigB5oR9D40fQq4Gl8TKgW17sF2Ppq4OKnNP9czOgSgMoF0WX02fcpx3KmY9EV4kvZcQqPqr/gktM/6XJSsPUDPWsw4pA== X-Google-Smtp-Source: AGHT+IEZwcgXZRbru7Hd+dSdIQInxyL9ypcmU9LLr9pkRdjZ1OnTOsh5dewz8t5JA1PW9taLzkIi X-Received: by 2002:a05:6402:3226:b0:566:1952:afc4 with SMTP id g38-20020a056402322600b005661952afc4mr370197eda.6.1709149699824; Wed, 28 Feb 2024 11:48:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709149699; cv=pass; d=google.com; s=arc-20160816; b=be944OW5YyQv5sNA00eWfX3kc8mk4lNC+b3IHzXL7bDwjEEG83J/YkDGPXF+dJDZKe 4PVCDw2/mJ+98RDTpNhd8jz3Zesq8Qcg7osad1Ey2LzbRTYWhG66cG+5iBUy3IE3EnoH SloMHJC+53reM/xaXPQmeQnldVjmTgkR7FAg2wjwlYg3ZwbwazUTNLBBblRI/azjDWdJ xKB3Zj7LsPA2bN0t4zVbzMBQGhYyAQQyTqpZw1Oz0pqk4CtR+lFlXCW9ictjvsEbC0bT 57fKGD7OOAjU2VUGwGZNyd/QNDfkBbGTrQLEhHLBsBYJwr1ifADxgpaLraHQxRIQit0m EIyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/GMSX6sWWOsoo4/guSjduizGVhX6C3jE3qMT/B6BT0I=; fh=YVyZ52J11q3dJXPerqbUq6V4YBcPvT30IUa0ZagnGKQ=; b=06AZDeyXIdzB7QtF96ip2B+xJ05Fu1JEe+SEz5m2ETrcw4QgxEzm9SPKz0mt/T2/T1 JioXhxXsJwVtr9FRuU4LQFlq78HxSJzavNlowaNCdQXmqSLRCmt66w9ne8UfgzbWxPeK WNvO4S/GmiH6OzCGbc0phY/pSIoubTgs0Wp/CZMsalTgdhcITlBv2dzOjFvkqF4U2jAR IyUrj+0rjam3IsnHvfmAw9zYixxvtVes4knKCnyLvQRTOgVJTJet0ijhVznokP48mA8U m/EnSgJ2vHTCVNsQhFdbvN3INT2HGNJQ/hrxKrIyHnDve74GtqmAg6noZb2VC26Zudmx 9Ggw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dnr0I0WC; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x29-20020a50d61d000000b005642ee620fasi1954242edi.114.2024.02.28.11.48.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:48:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dnr0I0WC; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8A61D1F28557 for ; Wed, 28 Feb 2024 19:48:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC34E5E094; Wed, 28 Feb 2024 19:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="dnr0I0WC" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EC945E078; Wed, 28 Feb 2024 19:47:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149679; cv=none; b=CyPCwxr0C2OL2UfVaFF/AcyYg4n4Gy8BR0kTRl4KvhRpNSe6PJpoQy//V+2YIBTSZ3VQhSuitx8nSxoxfHb6DvJlSH3ysMWBw+1UidSut3aVzDcchQKMazw7LoOgKbRmwoL+xdIRe2lwcpXcVnVkkUFhPkNqTwYZbJuI2WX8wg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149679; c=relaxed/simple; bh=VQbyziJAP7JAIcKEKd9Vn9Y5B1NnuYr6pANlsjIOyc4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DtZgn0AvUSvlZOUMkDk1NhwVvBq+mVB50jjdI9Aj4+fCvHUQhkF0JNZJXsjGl6pDKf0VVlysoS5Go0T9xhGuCF8et6DlErLC+0vQrWcI2Ja94+4zpXdr1lQqx+pjnXgnsSBQxEE1m89LxoV5mVSH+XOVJ3Om6MGbtI3lpq2SYCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=dnr0I0WC; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41SIhofu018782; Wed, 28 Feb 2024 19:47:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=/GMSX6sWWOsoo4/guSjduizGVhX6C3jE3qMT/B6BT0I=; b=dn r0I0WCLmpJ7yRgeUxarmRSqJbqgKA0DIbaxz5n531Wdam9NfI+pHS6Ka3Q8xDpD8 NUmJEYWo1+tKl+cNLcC0NDuPW8AujlvYJYNMsS+Bdw0+G9l9bOad8pRDVDJbZUsW lHc2nNT2kJaEDIdPGz+IuFfMIZBj8it4bRRVTnLXgkSgL926y0uGRdtW4q+z/W0j m6JsfrohLIxuISjXCwsGXjpC4uTF+6TzDduDS5OVkkECoF8GgoEELV/uG4G66hS2 RK6udHpvSuvfmtb8lJxnp1xZucj2uc9uKqOkYxDpKaVYw/TLxsfTjNxv0G0eCLCQ 2BfUmSLUkzfFPv5FvjUw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wj1d9sqhq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 19:47:49 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41SJlmjc022155 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 19:47:48 GMT Received: from abhinavk-linux1.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.1118.40; Wed, 28 Feb 2024 11:47:48 -0800 From: Abhinav Kumar To: , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Daniel Vetter" CC: , , , , Subject: [PATCH 2/2] drm/msm/dpu: drop dpu_kms from _dpu_kms_initialize_writeback Date: Wed, 28 Feb 2024 11:47:30 -0800 Message-ID: <20240228194730.619204-2-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240228194730.619204-1-quic_abhinavk@quicinc.com> References: <20240228194730.619204-1-quic_abhinavk@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: E7B4iOBq6kJLWRIraPW-OwGfl0u8BEd1 X-Proofpoint-ORIG-GUID: E7B4iOBq6kJLWRIraPW-OwGfl0u8BEd1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-28_08,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 spamscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280156 Following the pattern of other interfaces, lets align writeback as well by dropping the dpu_kms parameter in its _dpu_kms_initialize_* function. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index ab924ac78c9b..382ef4c8e8eb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -620,13 +620,12 @@ static int _dpu_kms_initialize_hdmi(struct drm_device *dev, } static int _dpu_kms_initialize_writeback(struct drm_device *dev, - struct msm_drm_private *priv, struct dpu_kms *dpu_kms, + struct msm_drm_private *priv, u32 maxlinewidth, const u32 *wb_formats, int n_formats) { struct drm_encoder *encoder = NULL; struct msm_display_info info; const enum dpu_wb wb_idx = WB_2; - u32 maxlinewidth; int rc; memset(&info, 0, sizeof(info)); @@ -636,8 +635,6 @@ static int _dpu_kms_initialize_writeback(struct drm_device *dev, info.h_tile_instance[0] = wb_idx; info.intf_type = INTF_WB; - maxlinewidth = dpu_rm_get_wb(&dpu_kms->rm, info.h_tile_instance[0])->caps->maxlinewidth; - encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_VIRTUAL, &info); if (IS_ERR(encoder)) { DPU_ERROR("encoder init failed for dsi display\n"); @@ -690,9 +687,12 @@ static int _dpu_kms_setup_displays(struct drm_device *dev, if (dpu_kms->catalog->wb_count) { for (i = 0; i < dpu_kms->catalog->wb_count; i++) { if (dpu_kms->catalog->wb[i].id == WB_2) { - rc = _dpu_kms_initialize_writeback(dev, priv, dpu_kms, - dpu_kms->catalog->wb[i].format_list, - dpu_kms->catalog->wb[i].num_formats); + u32 wb_maxlinewidth = dpu_kms->catalog->wb[i].maxlinewidth; + const u32 *wb_formats = dpu_kms->catalog->wb[i].format_list; + u32 n_formats = dpu_kms->catalog->wb[i].num_formats; + + rc = _dpu_kms_initialize_writeback(dev, priv, wb_maxlinewidth, + wb_formats, n_formats); if (rc) { DPU_ERROR("initialize_WB failed, rc = %d\n", rc); return rc; -- 2.34.1