From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 637BA19EED3 for ; Wed, 25 Feb 2026 08:10:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772007051; cv=none; b=tG4fAEKQ6WWEEYL7rynDN2VWi49ZbQqC3piEbdrxcMILw+6RGizZq++fXvxfURsfPzxRdr1QOSGD5KpUMtvdPQP4rBYcxoWTA10ZVe985UphZuBbYURHuvDDooSAiSaoGRWDL3teP8IbwxMJDaVMqJrNMP+L7JV/pa320/ozQh4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772007051; c=relaxed/simple; bh=mPW5eI8awGQjc9yS/t8RwPZTOrec6JdfnhwPWZig9ww=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=DOfU4SSlm0t8XKIYaZUQApDWQogKF990oEZVsX8fDa0ZBwthmg1XYwphSu2tUZ2L/sBAdrGpO66uFn6veXGYhs831whldtJXuRbL6JN8j5gItPwR7eyUAUnUWhvI8DsfXl6xXmuqRXNv/gy3VpW3fqtYBGDGpdFwyi3/PkO7ak8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from edelgard.fodlan.icenowy.me (unknown [112.94.101.233]) by APP-05 (Coremail) with SMTP id zQCowADXaQ2Arp5phP0dCQ--.9182S2; Wed, 25 Feb 2026 16:10:40 +0800 (CST) Message-ID: <80590bdf692add75da321a6fc595012d10192a14.camel@iscas.ac.cn> Subject: Re: [PATCH] drm/dumb-buffers: document that it's only for linear FB From: Icenowy Zheng To: Thomas Zimmermann , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Wed, 25 Feb 2026 16:10:39 +0800 In-Reply-To: <131b54f7-a611-4a02-aca8-5613643a6276@suse.de> References: <20260225061315.1003811-1-zhengxingda@iscas.ac.cn> <6515820a-3bb3-4868-9b30-9c1f80709ab2@suse.de> <35fba9692636a2f6ba9fabc8e67f5684a54b17f1.camel@iscas.ac.cn> <131b54f7-a611-4a02-aca8-5613643a6276@suse.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID:zQCowADXaQ2Arp5phP0dCQ--.9182S2 X-Coremail-Antispam: 1UD129KBjvJXoWxJF4DGr18XF13Wr4DurW5trb_yoW5WF1DpF W3KFW2yrs5AryfJr1jg3Z8ZFyayay7XF4fuas0y34xXr90yF1fWa18t398uF97ur1xGF12 qrnrtFyfur1UArJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkFb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IE w4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMc vjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCY1x0262kKe7AKxVWUAVWUtwCF04k2 0xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI 8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41l IxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07bYYLPUUUUU= X-CM-SenderInfo: x2kh0wp0lqwv3d6l2u1dvotugofq/ =E5=9C=A8 2026-02-25=E4=B8=89=E7=9A=84 08:47 +0100=EF=BC=8CThomas Zimmerman= n=E5=86=99=E9=81=93=EF=BC=9A >=20 >=20 > Am 25.02.26 um 08:38 schrieb Icenowy Zheng: > > =E5=9C=A8 2026-02-25=E4=B8=89=E7=9A=84 08:26 +0100=EF=BC=8CThomas Zimme= rmann=E5=86=99=E9=81=93=EF=BC=9A > > > Hi, > > >=20 > > > Am 25.02.26 um 07:13 schrieb Icenowy Zheng: > > > > The ioctl interfaces for dumb buffers currently only properly > > > > support > > > > linear buffers. > > > >=20 > > > > Mention this in the documentation snippet of dumb-buffers > > > > source > > > > code, > > > > which is referenced by drm-kms.rst and will end up in the built > > > > kernel > > > > documentation. > > > >=20 > > > > Also mention the existence of current drivers abusing dumb > > > > buffers > > > > for > > > > AFBC to reduce confusion about this. > > > >=20 > > > > Signed-off-by: Icenowy Zheng > > > > --- > > > > =C2=A0=C2=A0 drivers/gpu/drm/drm_dumb_buffers.c | 7 ++++++- > > > We documented the meaning of the color bits and the behavior of > > > the > > > dumb-buffer interface at [1]. If anything is missing, it should > > > be > > > added > > > there. > > Yes, I saw this piece of document; however it's part of the > > interface > > document instead of a concept document, and the whole existence of > > the >=20 > What is a concept document? Well I am patching this document snippet because it becomes part of the document at [1] (by being referenced in the .rst file). [1] https://docs.kernel.org/gpu/drm-kms.html#dumb-buffer-objects >=20 > > document snippet I am changing can be considered a duplicate of the > > interface document. > >=20 > > Thanks > > Icenowy > >=20 > > > Best regards > > > Thomas > > >=20 > > > [1] > > > https://elixir.bootlin.com/linux/v6.19/source/include/uapi/drm/drm_mo= de.h#L1200 > > >=20 > > > > =C2=A0=C2=A0 1 file changed, 6 insertions(+), 1 deletion(-) > > > >=20 > > > > diff --git a/drivers/gpu/drm/drm_dumb_buffers.c > > > > b/drivers/gpu/drm/drm_dumb_buffers.c > > > > index e2b62e5fb891b..06f74460adf62 100644 > > > > --- a/drivers/gpu/drm/drm_dumb_buffers.c > > > > +++ b/drivers/gpu/drm/drm_dumb_buffers.c > > > > @@ -57,7 +57,12 @@ > > > > =C2=A0=C2=A0=C2=A0 * > > > > =C2=A0=C2=A0=C2=A0 * Note that dumb objects may not be used for gpu > > > > acceleration, > > > > as has been > > > > =C2=A0=C2=A0=C2=A0 * attempted on some ARM embedded platforms. Such= drivers > > > > really > > > > must have > > > > - * a hardware-specific ioctl to allocate suitable buffer > > > > objects. > > > > + * a hardware-specific ioctl to allocate suitable buffer > > > > objects. > > > > They are > > > > + * also currently meant for only linear buffers, and using > > > > them > > > > with any > > > > + * modifier other than DRM_FORMAT_MOD_LINEAR is undefined > > > > behavior. There > > > > + * exist some KMS drivers abusing dumb objects for AFBC > > > > framebuffers, but this > > > > + * behavior is discouraged, only exists as a hack now and > > > > shouldn't be > > > > + * replicated. > > > > =C2=A0=C2=A0=C2=A0 */ > > > > =C2=A0=C2=A0=20 > > > > =C2=A0=C2=A0 static int drm_mode_align_dumb(struct drm_mode_create_= dumb > > > > *args,