From mboxrd@z Thu Jan 1 00:00:00 1970 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 B119F1B87C0 for ; Mon, 18 Aug 2025 18:35:29 +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=1755542131; cv=none; b=g8PiNXlSuCKgtGTFOgT6179D1MM2qhyR2shU/ENZSfRGuwCKRnoUn34v4qH+LY6Z1iRRmIzqWTIgz7Mhbk0/sB76PJUwH2wfchStYmJoBjoLuSpFBDeTu6QpK5qF2PJwl8gvW7Cm15WhgyqfZ0ltfs8tULgjVD9Y9RFcM/mcgu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755542131; c=relaxed/simple; bh=GBkYKQG/3CWk4TKezc0WE0I0huKsncujKyYDV13pI4g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bPtBksJJx5J/OI7O1+Xx+Y2kSGRigJ9KA7vbabaSkMp7Ss3MsTHTDxOMcgVc4Seg2/HLUPcBjWxPNpZ4YfRO7b18eUjg1lKjIMiYw2YKC5OoIuP7TTDi4gZSVsawArKvkgTKYCFFSzg/GP5C3VGAsuYVd/z6WiTvdRIcZ3nmTT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=AvjKASPb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="AvjKASPb" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57IEuaYR029844 for ; Mon, 18 Aug 2025 18:35:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LfY4G4CqKEkHfEGc9webJ8Mqx5xO+pkxGHroIuo5mZY=; b=AvjKASPbcVWwYskt 0bn6JVWulXwUfOFRaszps5kb9D5NoNNW+HDMJINRW2jpYzFuRW9XF2Su0Uw4cXhF y0qSvjt9/mPVXu8nLMYJdwf87AeKNR/2Im/8vyWGUJdbcYuVcBndK9muoRJLJ/xh Nz0YJNL2fiF5PCUh6oo5HQbQNvowR0vb10hKZr75SBJSUOZI3Vlj66G2uXF2DVIN D89f1xjjNnhhIhugWOsfmP5TywGZ7nRZSrYic3JLq4SHe97YgjyPVeEQc4uXrMVJ 733FptaxGEChuHzUDxpI6U4X+C1Qa+TcRrPTy53x+ihduKuWeDo2EhUAKro77YnW CBzjVQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48jjrfwva2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 18 Aug 2025 18:35:28 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-244581ce388so101860495ad.2 for ; Mon, 18 Aug 2025 11:35:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755542128; x=1756146928; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LfY4G4CqKEkHfEGc9webJ8Mqx5xO+pkxGHroIuo5mZY=; b=ULpHOa4/tjQwlqJF6y0LFC5KLy0m2BiOOWek/9lpxzy+e3qB3W8hALOEKIzxhvjq4z LuLpVd9/NPgNFdLmns4HAzM1hVZX9qTrwmhkeGLMU0PMMxTholpFqDm0LvpRoXs5MtPt 1ay5I/OiMWmi2XlCmFq/Y+DRBiwn3cunK0aldmeRHJXFlzGUhCkxUQ6DOpssmGne4C0P Cz4mt410pTPxUGTQ5kx314hqp24qsU1WF1tz1ju3ATREsgdmOZkt0l6re/Ht1FAFpYdS czEc6ymVl8cj7HY6uvfbYpGD1ZG+nAL6fEUcx/BFAmGSu7eEpCdLHhdXR4sxp7Gldz0m jSSA== X-Forwarded-Encrypted: i=1; AJvYcCUtxOBhH6V34Dp8JjS6KD8Rnx0WZThziQ0UEGqAe7x4JWkfkZAe62Nk+dohtbXBh+otMS9X2FVLgcPeDl8=@vger.kernel.org X-Gm-Message-State: AOJu0YxdgMtCBwPAVANBmUBpicYFNgJiQ8RLIVRfEcFB6w8kaQbl3NIq h+7jTKAR0jkYLeArC3T10PrUjqBviLsHKRemOBD+BmMGYy3+Va4/n9v6T5HsQj/15xOq3VilCoi WyBqnDlnpIRBew+2qNJn/aThlaN1+x2MhFUtMU0M7GJYhLE4WsGFAxQ1Hb23pBMiRuAA= X-Gm-Gg: ASbGncv3+ev097y/98hD7JymhFN3WFfYMCtl6RsQrMDbwTOtsI2bak1iL5OcW4Wk+xM lCgcqogopiyi/Ws6k0QpAZkGx/e4NZqPhU/u4D8y8RHfu5XiC1qDFhZ+SPyi2minFNUP8TSydKW +kMh+wwOs5JW0ex/W+xJQIgLTQ7+go6rj3Qpc60PeZ4iECqSrqVuPOWHlDs8Ju0k7Hf6z1MFjjT 37Jc08UJLNp2YIiUv7eaWw0mhsRCVawjoNS2bUHbRi+yvCIfZbxw3PfIypuBbSa1+BOuEJnp5y8 3lpT14xhUCFdHWwxCguRcYP1QxvEEBGYaVTzeoDV1oUOPZ1xFN3KmXM28ZzAUxmEtlO+vbtbz0H At4B3FYmymAtpXOdy2hgDOA== X-Received: by 2002:a17:903:2ac5:b0:23f:f3e1:7363 with SMTP id d9443c01a7336-2449cfb9e80mr5221345ad.23.1755542128008; Mon, 18 Aug 2025 11:35:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELuEhzg1tInCp2J0UUI+JjVQtMm+T8qI7xf/0+5/2hJCOJis2Fde9uo5MCZ53k19fKQnY75A== X-Received: by 2002:a17:903:2ac5:b0:23f:f3e1:7363 with SMTP id d9443c01a7336-2449cfb9e80mr5220815ad.23.1755542127524; Mon, 18 Aug 2025 11:35:27 -0700 (PDT) Received: from [10.134.71.99] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2446d50f8easm87137675ad.97.2025.08.18.11.35.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Aug 2025 11:35:27 -0700 (PDT) Message-ID: <41dacae0-0c66-493a-b5d8-a6df5f7e3b9e@oss.qualcomm.com> Date: Mon, 18 Aug 2025 11:35:19 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/8] drm/msm/dpu: use drmm_writeback_connector_init() To: Dmitry Baryshkov , Jani Nikula , "Kandpal, Suraj" , Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Sean Paul , Marijn Suijten , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Dave Stevenson , =?UTF-8?Q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Louis Chauvet References: <20250816-wb-drop-encoder-v2-0-f951de04f4f9@oss.qualcomm.com> <20250816-wb-drop-encoder-v2-5-f951de04f4f9@oss.qualcomm.com> Content-Language: en-US From: Jessica Zhang In-Reply-To: <20250816-wb-drop-encoder-v2-5-f951de04f4f9@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: qtjJUoJCkpd6TgiR7nGiguhoLAwvUJ-Q X-Authority-Analysis: v=2.4 cv=YrsPR5YX c=1 sm=1 tr=0 ts=68a37270 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=2OwXVqhp2XgA:10 a=QyXUC8HyAAAA:8 a=P-IC7800AAAA:8 a=EUspDBNiAAAA:8 a=NHqv8PQFZmVaGbn79gkA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 a=d3PnA9EDa4IxuAV0gXij:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODE2MDAzOSBTYWx0ZWRfX1oAbBHqwjRpv BKm9QcSj8xRfIOzg4L+5My65Qjo9KrZ7qLSd0aJ4zsxsg+4GY361NJfO4mL0aIqB2DmeWT2Q8kI hOMMR4oqe7MkbuYun6FAtkU8atLpGe8gabSCYteE9c6IG4wEXmMVJlUbYPcyaQNe9VhjIRFyog4 G1F/sAtfuYvxChVYzaQa7GoHNePWSvadNaLi4xn8zWO22/9ZHUeNkFa8CFUZnVLWhDNWRdMJIxX FM/OcSdL5NceUxUNnqQmRvvs9qpsjaPhIfGxNtb9ZsaCzIP0UJO70DTzS7Olwcma6Poe/gBjV9R LsuH98lqF9z2csQMiyBYrk4L8YOVn12odMJHYqn1r9tYF979Zml4hIxpvB9DfGSz3eGFRlFn3L7 uaVcJJup X-Proofpoint-ORIG-GUID: qtjJUoJCkpd6TgiR7nGiguhoLAwvUJ-Q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 spamscore=0 priorityscore=1501 phishscore=0 adultscore=0 bulkscore=0 clxscore=1015 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508160039 On 8/16/2025 8:19 AM, Dmitry Baryshkov wrote: > Use drmm_plain_encoder_alloc() to allocate simple encoder and > drmm_writeback_connector_init() in order to initialize writeback > connector instance. > > Reviewed-by: Suraj Kandpal > Reviewed-by: Louis Chauvet > Signed-off-by: Dmitry Baryshkov Hey Dmitry, Just a heads up, I think the commit message prefix here is incorrect. Thanks, Jessica Zhang > --- > .../gpu/drm/renesas/rcar-du/rcar_du_writeback.c | 23 +++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c > index 8cd37d7b8ae281cbc1fd8cbb243c621174517e23..64cea20d00b38861e22fc53375ab41ae988ceb59 100644 > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c > @@ -134,7 +134,6 @@ static void rcar_du_wb_conn_reset(struct drm_connector *connector) > static const struct drm_connector_funcs rcar_du_wb_conn_funcs = { > .reset = rcar_du_wb_conn_reset, > .fill_modes = drm_helper_probe_single_connector_modes, > - .destroy = drm_connector_cleanup, > .atomic_duplicate_state = rcar_du_wb_conn_duplicate_state, > .atomic_destroy_state = rcar_du_wb_conn_destroy_state, > }; > @@ -202,15 +201,25 @@ int rcar_du_writeback_init(struct rcar_du_device *rcdu, > { > struct drm_writeback_connector *wb_conn = &rcrtc->writeback; > > + struct drm_encoder *encoder; > + > + encoder = drmm_plain_encoder_alloc(&rcdu->ddev, NULL, > + DRM_MODE_ENCODER_VIRTUAL, NULL); > + if (IS_ERR(encoder)) > + return PTR_ERR(encoder); > + > + drm_encoder_helper_add(encoder, &rcar_du_wb_enc_helper_funcs); > + > + encoder->possible_crtcs = drm_crtc_mask(&rcrtc->crtc); > + > drm_connector_helper_add(&wb_conn->base, > &rcar_du_wb_conn_helper_funcs); > > - return drm_writeback_connector_init(&rcdu->ddev, wb_conn, > - &rcar_du_wb_conn_funcs, > - &rcar_du_wb_enc_helper_funcs, > - writeback_formats, > - ARRAY_SIZE(writeback_formats), > - 1 << drm_crtc_index(&rcrtc->crtc)); > + return drmm_writeback_connector_init(&rcdu->ddev, wb_conn, > + &rcar_du_wb_conn_funcs, > + encoder, > + writeback_formats, > + ARRAY_SIZE(writeback_formats)); > } > > void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc, >