From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0955C25B74 for ; Fri, 10 May 2024 17:59:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3045910E060; Fri, 10 May 2024 17:59:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LV9ScJWU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2894210E060 for ; Fri, 10 May 2024 17:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715363962; x=1746899962; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=zxvakhd8r61CwFADJbv6yraK/E7zSDvNgrdZKueZ+ZI=; b=LV9ScJWUUS82hZ2bAqw6MNVslmoC1EwJ4GyQD2YXKDm9nRbvhUTDkwQj KCUVfKutgUaS57UAyYxIqR/MhnYU2F9K9K/xPngGT5Qr8DVwBYV52zFOU Asy9hT0VLiD2sYjm5BFOa639DaHSKzgL6OFQeSDdiPTnssDGgjRHv7zTf Hcmquq7Bao9eclvUeweFytAhI/OUDKDFs5txTT7XhR6ybCiqhNQgy2DQU CLOYKle/QD2KeQCbWpz1HHDFsBf177v8PiyhlNZEMaotQEXGBBUzPk/gk N4wgsT9boYY8nTNyUcg0E3oDGVinQuzBsXU6a/P0X8yQTUsCuxfJw/4e3 g==; X-CSE-ConnectionGUID: qL+/QflYTmqWaFA3qPM/0w== X-CSE-MsgGUID: U76+O1HDQhCOiZwORdCYAw== X-IronPort-AV: E=McAfee;i="6600,9927,11069"; a="28842775" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="28842775" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 10:59:22 -0700 X-CSE-ConnectionGUID: 8+f3upVySxWNtQxv9T2pYQ== X-CSE-MsgGUID: VFCeQIZyQ4qGwwxtr/KNCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="29636801" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 10 May 2024 10:59:19 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 10 May 2024 20:59:18 +0300 Date: Fri, 10 May 2024 20:59:18 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula Cc: dri-devel@lists.freedesktop.org, Steven Price Subject: Re: [PATCH] drm: use "0" instead of "" for deprecated driver date Message-ID: References: <20240510090951.3398882-1-jani.nikula@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, May 10, 2024 at 08:33:59PM +0300, Ville Syrjälä wrote: > On Fri, May 10, 2024 at 12:09:51PM +0300, Jani Nikula wrote: > > libdrm does not like the empty string for driver date. Use "0" instead, > > which has been used by virtio previously. > > > > Reported-by: Steven Price > > Closes: https://lore.kernel.org/r/9d0cff47-308e-4b11-a9f3-4157dc26b6fa@arm.com > > Fixes: 7fb8af6798e8 ("drm: deprecate driver date") > > Signed-off-by: Jani Nikula > > --- > > drivers/gpu/drm/drm_ioctl.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > > index 89feb7306e47..51f39912866f 100644 > > --- a/drivers/gpu/drm/drm_ioctl.c > > +++ b/drivers/gpu/drm/drm_ioctl.c > > @@ -530,9 +530,9 @@ int drm_version(struct drm_device *dev, void *data, > > err = drm_copy_field(version->name, &version->name_len, > > dev->driver->name); > > > > - /* Driver date is deprecated. Return the empty string. */ > > + /* Driver date is deprecated. Userspace expects a non-empty string. */ > > if (!err) > > - err = drm_copy_field(version->date, &version->date_len, ""); > > + err = drm_copy_field(version->date, &version->date_len, "0"); > > Does this also fix igt/core_getversion which is on fire now? At least it fixes Xorg which currently just segfaults. Pushed to drm-misc-next. Thanks everyone. > > > if (!err) > > err = drm_copy_field(version->desc, &version->desc_len, > > dev->driver->desc); > > -- > > 2.39.2 > > -- > Ville Syrjälä > Intel -- Ville Syrjälä Intel