From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3233539E17A for ; Thu, 5 Mar 2026 16:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772727818; cv=none; b=gsewod8Q1pNSjI+WMwFopdvPNry6ov6nV9LCEm0TdWyRLDxSsGiOX1XhINLeOUM3k4iJ96aTrplN011ZWUoFJQ0U8LbgbIZezfBhqAJsuVZnnb+Q8CSuIEBBNQ0il/frQP/RDCcHZZjIDgmK1VxYJvncJRO/ph920MLHA58L4t0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772727818; c=relaxed/simple; bh=7xsD4lIWzE+awfvTIzRPC3OB16GBPtduWcLUi9tTsT8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nJaYMaoYg83FUpVQBFiz/rxKc+rEf78p5WHuh7G9JuG8JYWBa6I3ObRPfd5bPe1xlYVgBaFcb2Pw5JardQ7pJLPJn4e4/JF74QzLsBYX2CKSUwt/gGhsRfQyLa45I6Q4CesHNMOxFLivBYA7enidv2sx+E82+NBYtMmWYOlmVMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lArTbfkO; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lArTbfkO" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-48374014a77so99783955e9.3 for ; Thu, 05 Mar 2026 08:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772727814; x=1773332614; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Xr85rovo5UV3Etw3oVSyYm7W2zGoR48MtrXiaczPwz0=; b=lArTbfkOcZwxsLUTcHsvdeWODv33EURJtIPbq7lrhagnDX4DpSj88rnG+a25NvsWK8 IaUgz0cmj7+fn9pBKrP0L+u3LlgHsdtAt5wLjeKoMLAOzefQVxkqMcU2kJ0aDSdy6XBO GNpm7r8tBeLAznU7TWG3gHZVBuZX8VvV+HIH6wbj08shqRnDKqL+cilnPzUvCb4z+NSa +ato1a+DXZttw4uQaJTK12lh2PCVvrhkM/AJnZnJQ/b8yvdTsMIowSbkdGaoe8w5en+Y 3btP6SP0laFsQ1UA3VIz6fWR68hfjYCpmTuLhFV1bcLva/JhqjfLwizqCSF8rNNlBB72 jrmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772727814; x=1773332614; h=content-transfer-encoding:in-reply-to:content-language:from :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; bh=Xr85rovo5UV3Etw3oVSyYm7W2zGoR48MtrXiaczPwz0=; b=XOD8GBwn4huh6S4Ae7viWiIMyPdGBH2IRHzVojVs2F+FwsStXnO1rl6hK5Vqhrz/yn o6hqatlpVp93CqZkNsAsIqDRSqw0ax8ERuevO6WyWbnqxmZi3gwUMHJtEseXd7UpiZzL mep4OrhnCklrpxFSPNKgsV+l3HlNhFdnhulx6rwFU/qJWtj1Tgxcma3VQF0Y1UJ6NfSn VATYeqcoFXCWQgdLDAjVF/rhEG52XbIuAqN7ro3HcF1Z4RyEOwwJhDlBLA1nv/07hxmW otXXdasZ1S+akyzldtMnk+ZcgTTi6nDgH/LT66Pxwgm4n038GiDBJJWtxj32f/xG2ybr IHmQ== X-Forwarded-Encrypted: i=1; AJvYcCWQ3+k3JE6p53UDPczR2bPB9Pg1IeX4Kti+9FtLOK7Jnxm3YITLPAic2bqlrxo+yDmPORqKA1uS75PFxcY=@vger.kernel.org X-Gm-Message-State: AOJu0YxxJ7/dJRmIZqh6Cl68ZMSX9l3FiS9KXRE6j7SYRij0hhr9kfJ1 a5qIThnhQ20eX61Za68wPIiOiMfTVPL/H2sv7qkxKA6vQS/u22VmQ8w8 X-Gm-Gg: ATEYQzw8rCvW5ZwvgoTbl96K1dhbrZGPnpKFkEgmbKgl+PXlKRJsE+GUr3niRwgA90j yMSydfLOFGC0jCRNVgwbfary8+vcfzTjOAJPQYYo+jxd8nOIBpZZP+QX+xKnLaH94W4p/NTOI1Q 9EPYJTfNbs8xkixuEd/andheF8RsFj4m8A/mmH+dSEXzIAqapujbOPAhPGyOv/VbQFiuPyfBAHl AXmZAeZasSXvbWyEkqLcvoQ8J/XwAbCNck3EJxquz6SGVqfybgKAo5E9y4k5BeDRVsC3cEjn6Od WnsSkvIF2vFS0KvCnoUtY/2Jxr8/5gmCgzw2LFwcCoSK2s9UpqXaOUGcTIUHlhJqEdl1kLHcNNY RO30/A0a4d8nhbvJl6QJ3aT5C59/xsrS+Mu7V3EQ9SOshJh1ACGT13QuU9+IEm1RsACualcGJsO OdqOn+tMNVdBwJO20MuHnsiIhxzAQOzGxa1tD9V6hq8sbz9oCWVPSTKuCpktQ= X-Received: by 2002:a05:600c:4e8b:b0:480:1d0b:2d32 with SMTP id 5b1f17b1804b1-48519847bb7mr115427655e9.12.1772727813983; Thu, 05 Mar 2026 08:23:33 -0800 (PST) Received: from [10.247.12.125] ([129.234.0.168]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439ae3f31dbsm38967659f8f.1.2026.03.05.08.23.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Mar 2026 08:23:33 -0800 (PST) Message-ID: <3167d5c6-3454-4652-86c7-e9ef0ef0a517@gmail.com> Date: Thu, 5 Mar 2026 16:23:32 +0000 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: [RFC PATCH v3 0/3] Querying errors from drm_syncobj To: =?UTF-8?Q?Christian_K=C3=B6nig?= , =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, Tvrtko Ursulin , Philipp Stanner , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , matthew.brost@intel.com References: <20260225124609.968505-1-yiconghui@gmail.com> <3491d5f9-d08e-4193-a983-45340af73745@amd.com> <7300ad7c-39a5-4424-b4fd-9d3f97083f06@mailbox.org> From: Yicong Hui Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/25/26 1:57 PM, Christian König wrote: > On 2/25/26 14:37, Michel Dänzer wrote: >> On 2/25/26 14:25, Christian König wrote: >>> On 2/25/26 13:46, Yicong Hui wrote: >>>> This patch series adds 2 new flags, DRM_SYNCOBJ_QUERY_FLAGS_ERROR and >>>> DRM_SYNCOBJ_WAIT_FLAGS_ABORT_ON_ERROR for 3 ioctl operations >>>> DRM_IOCTL_SYNCOBJ_QUERY, DRM_IOCTL_SYNCOBJ_WAIT and >>>> DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT to allow them to batch-request error >>>> codes from multiple syncobjs and abort early upon error of any of them. >>> >>> Patch #1 looks good enough to add my rb. >>> >>> Patch #2 looks good as well, but I'm not familiar enough with the code and have no time to wrap my head around it to give a review. >>> >>> Adding a few people on CC, maybe somebody has time to take another look. >>> >>>> >>>> Based on discussions from Michel Dänzer and Christian König, and a >>>> starter task from the DRM todo documentation. >>>> >>>> See https://gitlab.gnome.org/GNOME/mutter/-/issues/4624 for discussions >>>> on userspace implementation. >>>> >>>> I have looked into adding sub test cases into syncobj_wait.c and >>>> syncobj_timeline.c, igt-tests for this and I think I understand the >>>> process for writing tests and submitting them, however, these ioctls >>>> only trigger in the case that there is an error, but I am not sure what >>>> is the best way to artifically trigger an error from userspace in order >>>> to test that these ioctl flags work. What's the recommended way to >>>> approach this? >>> >>> When Michel agrees that this is the way to go then we either need an in-kernel selftest (see directory drivers/gpu/drm/tests/) or an userspace IGT test. >>> >>> Not sure what is more appropriate, maybe somebody on CC has more experience with that. >> >> I'd advise against landing this in the kernel before there's a corresponding display server implementation making use of it, in a mergeable state. > > Yeah we clearly have the rule that this can't be pushed into the kernel without userspace code as well. > >> Otherwise you might end up with the kernel having to support UAPI which no real-world user space actually uses. Been there, done that myself. >> >> >> I don't have the capacity to contribute anything more than advice at this point. > > Oh that is sad. Do you know anybody who could work on that? > > It is a clear improvement to error handling and I don't like to keep Yicong's work only on the mailing list. > > Thanks, > Christian. > Hello Is there anything else I can do? Or will we have to just leave all of this here unmerged I have read the emails from Tvrtko and Matthew and I'm absolutely happy to send a v4 to ameliorate these issues, but there might not be a need to do so if the series won't get merged in the end Regardless, thank you to Christian and all the maintainers for being welcoming and all your work reviewing this patch series so far! Thanks Yicong