From nobody Thu Nov 28 08:49:49 2024 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.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 304E61D0434 for ; Wed, 2 Oct 2024 15:06:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881614; cv=none; b=HwS/vVeJ0pupbchN8n+jHrERSqe15IaXMzsNX+iCUp1ZIQQ05+8QMSAwe4h1/YswcS/4e57JJXyhTw6YyEQ7ST/WfQWzkN0tniNLpDm+qJ9Cz8iO6r/elJwYBmlN00bCJvfXFMxRuvdy7kzTa4ELprgwg6kV/Gl+bkR3FrT+G38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881614; c=relaxed/simple; bh=s0ZYaoZy5RxDRoP4fCLym1q4d4J+shoVMr+lDQeMhks=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mhXVC1NA1epytqHzpuEwhofn3j6HwV7w8ME1SHJ7ZbzByzucK92MKW27jOs6h0LokLm/0ypUMzkAkLCKglxB4yxEDo+NssUvxZXZ/euVs2rHHxkRHTG/vWjfU7O95m202QkiQ1PwLQXXWLt4v9Ju6Xo11fOLZRsGcSsR2v4OpKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=P89GCkDb; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="P89GCkDb" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-37ce8458ae3so3100842f8f.1 for ; Wed, 02 Oct 2024 08:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1727881611; x=1728486411; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3wuudxDZwL1ziyHfxVsUQH/I2F8ewPn5gbw+DbZPTKE=; b=P89GCkDbHT9rTmWBVG2WFjvNY8nBb0PcQ+NwPMzmdyCLsplPT5wjDjQ628wplrPCz5 9VLK6n5CaHQbbk9MFAOLF2xCpFx1ekhtMy7f2L0ulfIHmiXfu1+kSWdyBDfpG4h1QQuQ UVUbfgbrgBuPTnnEfPG+e5O3of+3fEZ1elbvETolpVE2uo2oIXXs3TAj1KrrU2Nn/Goi jgSPb1XrRG1VRNVR0cT0evqjziPfGM80fBfRwIax0oSvaK5Rfs5IpZCzkwt9G1ohlr6e KuComgD5NtniQfc+dDipafTOkm7wOiK5z3tre8uVN0X6e4gxBoQrXdugFE8+ceavrbLo fFJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727881611; x=1728486411; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3wuudxDZwL1ziyHfxVsUQH/I2F8ewPn5gbw+DbZPTKE=; b=Rji/l8/fenM+ttJq6M6UI2ffhgaLBKGNWF/NuoTTOeUOr7zTtnERPrhZNvpcaPHqOu Exwk94YpQXtMhWOZlXpdKGDFcYe3omU9Vnvi65nXqav2aTKIgZ53zMmIjVikpfamq2HL zqashOz4XKOgVKpE7q2E1+yrEnjFHAfiRIfoKrU/k0T7q2j+nxweCFXUxBzxs62jknAN bYwSNJEao+dCJwpL27LZUp3m99cSalrkhhzPWJC7XqcC5jUEyp+iPpm9VBbF1q/qpQHD 79THyfMkGeKir+jIA45OcM+E1m0HIoTwYLxFX1kgcwJLoeFUtuuq48vE98y4vG5qqDYp ma9A== X-Forwarded-Encrypted: i=1; AJvYcCUVSIzD29BDpc7MIC6M/Gfi+EBghwHZeSP121O1PslRy9Y3CNHbU8W4B0E1bU5rb4ITiZ+AkZiZd/tW12A=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7WqUv7q7nfch1jfZDetz0tH3DLvxb7Q7T4JWF8ZuV0YWNIs8m mjboRFmH6+zVb40kwswA6uqtHXq8Fc5zNgO53DsyAG+ZjMyrcJQrnscFXcwiFTM= X-Google-Smtp-Source: AGHT+IHWOP5x5OgGMlJLFrprCPz4xB9T/rqwZqubCZ2Ex7qOQhyYFFIozvlL0zfFLPyvvUeHBp07Mw== X-Received: by 2002:a5d:64a5:0:b0:37c:d53a:612e with SMTP id ffacd0b85a97d-37cfba189d3mr2738282f8f.51.1727881611322; Wed, 02 Oct 2024 08:06:51 -0700 (PDT) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42f79ec0a44sm20794485e9.17.2024.10.02.08.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 08:06:49 -0700 (PDT) From: Dave Stevenson Date: Wed, 02 Oct 2024 16:06:19 +0100 Subject: [PATCH 1/2] drm/vc4: Run default client setup for all variants. Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241002-vc4_fbdev_fix-v1-1-8737bd11b147@raspberrypi.com> References: <20241002-vc4_fbdev_fix-v1-0-8737bd11b147@raspberrypi.com> In-Reply-To: <20241002-vc4_fbdev_fix-v1-0-8737bd11b147@raspberrypi.com> To: Maxime Ripard , Raspberry Pi Kernel Maintenance , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Javier Martinez Canillas Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dave Stevenson X-Mailer: b4 0.14.1 Commit 45903624e9fc ("drm/vc4: Run DRM default client setup") only added DRM_FBDEV_DMA_DRIVER_OPS for the vc4 (Pi0-3) driver definition, which caused an issue on vc5 (Pi4) as there was no fbdev_probe function defined. Fixes: 45903624e9fc ("drm/vc4: Run DRM default client setup") Signed-off-by: Dave Stevenson Reviewed-by: Ma=C3=ADra Canal --- drivers/gpu/drm/vc4/vc4_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 13a1ecddbca3..a238f76a6073 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -238,6 +238,7 @@ const struct drm_driver vc5_drm_driver =3D { #endif =20 DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE(vc5_dumb_create), + DRM_FBDEV_DMA_DRIVER_OPS, =20 .fops =3D &vc4_drm_fops, =20 --=20 2.34.1 From nobody Thu Nov 28 08:49:49 2024 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 D3B3A1D095D for ; Wed, 2 Oct 2024 15:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881616; cv=none; b=Cs81AfTdtv/nKKccjyeKwtVre0MH+O13B+yNTvYmwtxyWoamC+vthHmjaNXNO6H5lTa4SG9K5dYKAyXLvjgBIikQa4BmEElDd8ZZYgQx0+vGJ9W3i3DTfs9c4tcp6PC0/VarCAbJWsCteyHnhWiIKFgJzlgkJr2mEPhWszUuro4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881616; c=relaxed/simple; bh=fXCr/hsYedWkZJ9fW1Lkt3YBn7qDCmXTUPB0bTCcb9Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uNhVEfGdLYyjscqwo2glKQrIEm/A7c1xA+20zDaFB0c+jTamjZgYCfQJPht3oSr/Si8gsSRdvC/ORd8NW2BQJqQwifKpoxFkd7UhO5IATJKuo+TUetWpteoPWuiZOCIQpEx0Q1LsawuSOuVIwnj5O2CIRqqq5fYSUxyeZGvMitw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=t1sHDfpL; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="t1sHDfpL" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5398e4ae9efso4742960e87.1 for ; Wed, 02 Oct 2024 08:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1727881613; x=1728486413; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0aaSKJint9BKAl1EBaxoQ2jVgmDuzxX5hASejfL2+k4=; b=t1sHDfpLvijmbXIVzlKDkn2mgC/jBtfutqJ4WljPVYAH3ARP3KzgJ5Pzcl22FHJj3Y zN6GDEO+7Bf4Bk+k1cNpThv0gu/A80xsnW68OnnZ8+a4+d1+9bfHoWGpAgxu6+6h/CqU hZYRHHcuUtRnDsTuX5P+rRfSSzuCPfLZtxSHdyYgw6opIfIJJ42kImvR9ySeKFqyhFK/ bOxMgLFEwVBPNjtzSGbY/YfAlfe+pR18Z/DI2cTE6nsX50fZ8RJYpwlDmsmgjFA7c+oV qEDc9KM8IdkjTU1YXopXlpthsF1iIkeq91EhoeTV87Yk2ufE1ITT/KiPjBe1cr+lXAbY yO+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727881613; x=1728486413; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0aaSKJint9BKAl1EBaxoQ2jVgmDuzxX5hASejfL2+k4=; b=ds364PYwMo9ed4kOCN2no/x+1vaXjCtC3hs/enNbTmxGkMCt8M8fyzjfq6SHCwWftX MHAHbRqi7CKgc8SfNwtchijaVIEm62TO9/CIchHk+Gg+DXVSjaFxzfr1VnMptbRmjPAB VmY27MtGyFrVmk8iD2JhUTFkCoEpP6i/HyEVkQY3HB8RxTRXO/bVa/vOyhdRI+iuwIvd MYXiDNcdUo/k0y8eQPehspkd4e+2buP5+4LZQbHYAsT8lRwB/gO7CEKe5TMcgkys3Rin cNyzF9yOdwJYthlbsSzKzqf69uY6yZRIL/p3C3jb9ZcvgZuQJnIFnqWROjn18D1kBbhw j4mQ== X-Forwarded-Encrypted: i=1; AJvYcCV6VQ4Cp89fz0AXiejQnuMrJ2sTL1O/ro1kcaB7mupoJ6nPadmUUBary2/v5n61KlYkgjamZ+vx2cm3HGo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8uSsTr/SfJHIlKFkq052gd98jsJD4qGLIcX+J0jcjW8WvutIF dwlRWG9qJk7JTSDbAD42vj1ynQDLtRiHHIuqeUZSDAhY8IvjDPjyiIUIj1Cr5KQ= X-Google-Smtp-Source: AGHT+IHRN0bivOMkxtd7P9Vwt5ImGLSLuu4E/375FOcRMlxCyc6JCW56eMN/xSM59wtgzA73gEK8MA== X-Received: by 2002:a05:6512:4011:b0:52e:9481:eaa1 with SMTP id 2adb3069b0e04-539a06656cemr2152474e87.23.1727881612849; Wed, 02 Oct 2024 08:06:52 -0700 (PDT) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42f79ec0a44sm20794485e9.17.2024.10.02.08.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 08:06:52 -0700 (PDT) From: Dave Stevenson Date: Wed, 02 Oct 2024 16:06:20 +0100 Subject: [PATCH 2/2] drm/fbdev: Ensure that one of the probe functions is defined Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241002-vc4_fbdev_fix-v1-2-8737bd11b147@raspberrypi.com> References: <20241002-vc4_fbdev_fix-v1-0-8737bd11b147@raspberrypi.com> In-Reply-To: <20241002-vc4_fbdev_fix-v1-0-8737bd11b147@raspberrypi.com> To: Maxime Ripard , Raspberry Pi Kernel Maintenance , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Javier Martinez Canillas Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dave Stevenson X-Mailer: b4 0.14.1 Commit 5d08c44e47b9 ("drm/fbdev: Add memory-agnostic fbdev client") added the newer probe function, but left a path where no probe function was called. fb_helper->fb would then be NULL and the strcpy would throw a NULL pointer exception. Handle that error case. Fixes: 5d08c44e47b9 ("drm/fbdev: Add memory-agnostic fbdev client") Signed-off-by: Dave Stevenson --- drivers/gpu/drm/drm_fb_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helpe= r.c index d5e8994345bb..9c8868d7b9d3 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1635,6 +1635,8 @@ static int drm_fb_helper_single_fb_probe(struct drm_f= b_helper *fb_helper) ret =3D dev->driver->fbdev_probe(fb_helper, &sizes); else if (fb_helper->funcs) ret =3D fb_helper->funcs->fb_probe(fb_helper, &sizes); + else + ret =3D -EINVAL; if (ret < 0) return ret; =20 --=20 2.34.1