From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 A54233939B3 for ; Mon, 24 Aug 2026 07:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787556698; cv=none; b=oiu84Ke0n4OkLbY3s2uMYL6ABQ6AC8KyX3J/jitcbWehJWceNqfJuKSVnrLBq3b/ELde0I8GzMTLaPatuG7c5KS5Twykfq11YTuaSdXHhHUH1oi9anDkCUjdn8m1t6yO3fIVnMz9PpRJHLU6KMHLlgj9jgqEiabr9oLji/E3LTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787556698; c=relaxed/simple; bh=FYyWjZdZhey4H4yztr+dh50ZItJaR+WTAiHGMz5cEco=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nlKlSYRIYqqtlxH/KBF4WE2IvQfK+E/s7ZZ0kDuTPTFUQsvBYlIwv0V/bdrojNYH0Gs2N5i8E5wda417svw5KJ9U5iWMTi7lodhiZB3lYswHOyuDIIR8UR+qx5DzduvuKBmaKC/P3v56PhBDiGbu/a1LBxK1jrFqxY0J2V/+Dfo= 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=f9i87oxO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=eAIkUQpY; arc=none smtp.client-ip=205.220.180.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="f9i87oxO"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="eAIkUQpY" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67O5Rf74867303 for ; Mon, 24 Aug 2026 07:31:33 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= GGW/2o11ZVLZJS92GyTOiHn4rgI8UzeMrVaPCXBo8Ng=; b=f9i87oxOAOwb1iso E6OrkENYef5T6l01cPTtRQ0nXkcn1Hm4S8CajoKsOt0iWII+bFTlD4dvVaRqvmkb QvPbSCHQjcLPPeDEpfuUFU1VwaZlvt9Rz/LFlwHUSqMBo+rn6/EaCKoPeIPzmyhP wFpSo1sTtod2YdHgHjqlshmoIsT224dyECJLMUCZEDKfVCo0n5MmY/l4XR3LTz0t 6lrG2HqQ3HyoiNIRJ19K14oMKvEQYfpuCFvWpKVMRGAmrKztm3vi4aVymuLHpt6T hAa3hJn5wUK7V+voSLLBNJ4JOYsKQDqgAezNRh9l4xAgftLHiuNQ7S+pgUMgjxLK 82hWpA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g744qwx2f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 24 Aug 2026 07:31:33 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-38e54b6556aso3629716a91.2 for ; Mon, 24 Aug 2026 00:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787556692; x=1788161492; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GGW/2o11ZVLZJS92GyTOiHn4rgI8UzeMrVaPCXBo8Ng=; b=eAIkUQpYJqhiIndoCPNXt0ONFD5P9tIypOibq2Pv6WD/LmZAVQAhOO21PfOH4DfU+S SGv836YsqzrJzOVxoWSd/veIWflY903ZInTyLK4/SdtmcvoAbNaZ3heQ/QR13rBYoBNb lZbXyrN2WfY7UCSKp/YCgt34ZAbRqeKbm0vv1nJYTNpILRVct/BdV3pR/0D4+5bAFZZS QZe6vT2FEgibMImaLLK3vOw5rOf1WoKt3dGS5tUc7N2ckDdoY9J4JP7RsyrE/0D3bCoj uREPD8mpEgRo1nagyvGX5PzugjTHEPdP0QJEtEgynOhXUYyEfqSMatnRsM78Fih+PYbC MGnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787556692; x=1788161492; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GGW/2o11ZVLZJS92GyTOiHn4rgI8UzeMrVaPCXBo8Ng=; b=gezT3WsyEF10bmutNxNqhDcWApUAf/5AQqerDeXfLkLk/vREqO/YKzOR9Qz1K23aJg +HgIoTrt/Xsyq5XdK8tspFmozpiCTmxddfC6jtEfP3eLLZC7mg8qEQSjPIEdDOu+Z56y Xk+84Y6k/9oae04POdIjFz0OHhsZJluzWRpxtDRto+Cywwg/2G3ox1cJ3pktpuuBjYTK W7ziRJ3DwdWdsp+G6eyZjW8u9/ARPjtWjiIi1tHZ6FxrdU60+oInWJWdS5+HnVCxj/ZS nDjvmtyVCCFABM5oBqrtWZMBXzHak8eYpl6tFFL9bvGaGNG85EE7r4S/T1U2cPkPP+AO SOgw== X-Forwarded-Encrypted: i=1; AHgh+RrlalX59ECYgJlBydcpVzj/DAIxqJnWsv6L64xZj+rOQY7DsUjleKa+Q/g1/9nJRYax8t61ZuNSUsMTfno=@vger.kernel.org X-Gm-Message-State: AFuF++ksBIYyb+3JK2lKlcaFJ0svhEEhyI0p6cRJQ9WJnLI7h6d0ukP1 P5CdsHQ9fhO0S2O1ajzkaS/jdknmr0K3o0xy5EoFwaGPepEGVZ+iftoOmBec2rD+GSpLFL/Mig5 JsXUSErZbu+gcqS7tFbQsEdYGri3M47Rpn4beD0gjnhat2axdYk+YXQDD5hiYikgrl9M= X-Gm-Gg: AR+sD13fAtHrFEYpLD+cDIf9Q8gbZvMhfBYr6qeZdJCPaRTum41VuGHC0v0HsTi59Hk CDQBw8mSaZp3uLPnIBEiM3v0gO/UR0IHr495Sl1vQ3zNXZlOuZW5Q6uLX4xyutVaOiZDutEp6Ne X5rUeV+aqlHDQr6ZOvemtp1QBgtLq7EWAL7DWmoJTVJsqNjvR1OcBJi1jdghxcql6Sl3sM28LJx DKoPqFYeOSiewz5jBXP/tOX67gMSFGM2FedJNfoMiRfuNFW3kd3OLsBmsVwoDQmDDogcE4RnPyP LOCTFwubQ82F3sY4UzHZd1WeVztwfvTdrPBgGM/5DHAtyQAMPTxuFb+HT2QJCZMyI9367lbM/OL iBhLHiGseY9vNgEqidVHZAiBH++Tm X-Received: by 2002:a17:90b:5112:b0:381:cef1:11ac with SMTP id 98e67ed59e1d1-395df3cf1c8mr30844159a91.10.1787556692367; Mon, 24 Aug 2026 00:31:32 -0700 (PDT) X-Received: by 2002:a17:90b:5112:b0:381:cef1:11ac with SMTP id 98e67ed59e1d1-395df3cf1c8mr30844077a91.10.1787556691821; Mon, 24 Aug 2026 00:31:31 -0700 (PDT) Received: from [10.204.78.119] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e49b406bsm8987302a91.8.2026.08.24.00.31.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Aug 2026 00:31:31 -0700 (PDT) Message-ID: <672f91dd-749a-4448-ab32-50ac064a4b98@oss.qualcomm.com> Date: Mon, 24 Aug 2026 13:01:26 +0530 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] drm/msm/dpu: advertise linear-only modifiers on platforms without UBWC To: Mahadevan P , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260819-remove_ubwc-v1-1-5357d5cc517f@oss.qualcomm.com> Content-Language: en-GB From: Nabige Aala In-Reply-To: <20260819-remove_ubwc-v1-1-5357d5cc517f@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: 0B72KVhg2_OI4Jl9kPRqSmvoKtRu0rjp X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI0MDA2NSBTYWx0ZWRfX7/dNt9DtGc+C m8iK29yZmxnRrOOkX//FG9fb8PqSxFoMDB0J0GVKPebE8gZTklXm7F24XDHnldjbBYHqE0OvmgZ yRjmefXZg06ICOW5oQCij6Uz/EzVnrQQTvT6kMLIhngJi6AdHFz5nAsetA8tKOhcZFEUml+jC49 rJViHKkb+P5D0T7yPdCV2/nrPvHB4x1EAHESfJ2QgD+OFhaxH9zQ8bZPOG4aAxawR9u1Cz6DKrT hziUTqI2EzHkK9kXwTEEYY5EhAA5G63/VRVkd9OtcP4WNX12rfghnY5QaGnIX8lMHrOo8bI5hut O33okxyjMeW5Nz2Nn2E2RUVZkiQG7/h5X4q+KauHODK2sv9YBJRwFs+eqycPe5AlKt2G0uKjz5c y9thsxV3oqdC429e9ToydTvlYO/MLvQ2591DUu1/9NHtqrY4zT24nHlKHJDuMO4WxGLrJWoXO7S 74JamMxP0BjmjKPudag== X-Proofpoint-GUID: 0B72KVhg2_OI4Jl9kPRqSmvoKtRu0rjp X-Proofpoint-Spam-Info: AW1haW4tMjYwODI0MDA2NSBTYWx0ZWRfXyUUnygsSCt74 mNzyWMgbzmVD1cZapCK9tkhsIA0p4BD8triGbX2iPZHwQnCdrqNXbb8YsXZiwO2taRJwfv3IIEF Q+CP9g0SCzVuqhT9Hft1nEFO7bpvgS0= X-Authority-Analysis: v=2.4 cv=BNuDalQG c=1 sm=1 tr=0 ts=6a8bf355 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=6mis40y7Vwa8aKjL8IcA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-24_02,2026-08-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608240065 On 8/19/2026 4:53 PM, Mahadevan P wrote: > Certain Qualcomm targets like QCM2290 and Shikra do not have UBWC > support. On such targets, advertising DRM_FORMAT_MOD_QCOM_COMPRESSED > in the supported modifier list causes userspace to attempt UBWC > allocations that the kernel rejects: > > msm_dpu: [drm] *ERROR* unsupported format modifier 500000000000003 > msm_dpu: [drm] *ERROR* unsupported pixel format: AR24 little-endian > > On platforms without UBWC, only advertise DRM_FORMAT_MOD_LINEAR to > avoid exposing formats that the hardware cannot handle. > > Fixes: 71c5c23be874 ("drm/msm/dpu: check ubwc support before adding compressed formats") > Signed-off-by: Mahadevan P > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c > index 7b92082d35a6..c8bd034690cb 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c > @@ -94,6 +94,11 @@ static const uint64_t supported_format_modifiers[] = { > DRM_FORMAT_MOD_INVALID > }; > > +static const uint64_t supported_format_modifiers_no_ubwc[] = { > + DRM_FORMAT_MOD_LINEAR, > + DRM_FORMAT_MOD_INVALID > +}; > + > #define to_dpu_plane(x) container_of(x, struct dpu_plane, base) > > static struct dpu_kms *_dpu_plane_get_kms(struct drm_plane *plane) > @@ -1836,7 +1841,10 @@ static struct drm_plane *dpu_plane_init_common(struct drm_device *dev, > pdpu = drmm_universal_plane_alloc(dev, struct dpu_plane, base, > 0xff, &dpu_plane_funcs, > format_list, num_formats, > - supported_format_modifiers, type, NULL); > + (kms->mdss->ubwc_enc_version == 0) ? > + supported_format_modifiers_no_ubwc : > + supported_format_modifiers, Can we just pass the NULL here in case no ubwc modifer are supported instead of "supported_format_modifier_no_ubwc"? would not it automatically handled in this function __drm_universal_plane_init as default_modifier? Thanks, Nabige > + type, NULL); > if (IS_ERR(pdpu)) > return ERR_CAST(pdpu); > > > --- > base-commit: e6664f2b33db9b6811eb4cec109f06cb2b4f458d > change-id: 20260819-remove_ubwc-0180dfb2908c > > Best regards,