From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (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 B668E3EF0A3 for ; Fri, 6 Feb 2026 13:41:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770385264; cv=none; b=SoXwbTC6hrYVEThVWaRx0WtHii8YQPW8C+97XlLVfxuyT3hj/QiLlvIOiKUg+uBxyvfjWUJr2oEk4a/MVmah0808/GDY4/BYuyo2j3pIKC/To/xMpu/ic76r59uhX2lKp2/AhnyC666uhKVABKENLJmJcaYILGeBaLRk93eulkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770385264; c=relaxed/simple; bh=5fcT0SzSVJ2n6OKiIbzryDIoVCr0R0JBtArpF8/4OL0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=iikawWWT702COOJqPboA7/ynNsTmju3VNNeXfMSeqYFd28BNKXpU0iJD2AtAFSITDgVeDw8ohi+K7JV9PlnT3tBhYhipX4qROS3tSOIpzaK4Ne25UsLsmYHPJnmubnsByki5wUuD7aKz1pHIn+HT7CH2L/wFndIQdlbWdmKUI74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gaVTMRdL; arc=none smtp.client-ip=209.85.128.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gaVTMRdL" Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-4801eb2c0a5so20176265e9.3 for ; Fri, 06 Feb 2026 05:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770385262; x=1770990062; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=L4wcUhQ3FNh4u/EXh+x6aUXh5+ro8iD671/61i0x1bc=; b=gaVTMRdLnMXihNvw/WjGK93B3sH4vHxdp/qwySkbKCrL9rq+aFfSJRYQzyDnCEmXSj 3utxsIyVqjW0gx8hv18NkxbJPs8IBh7EnOuyZ/4+6egpzSNOlXmxGCYFFWNLMWBRDdv9 y8lOnc1HsyUFjFMfsB9UwGP7bQHUU1h++/V+atpE5JeEGYUIV0avAxMpQiDgHNCnzfWs OuD5XTJC0ajUGyPYup+/7VqsCnJCAbmF1yHpe9LpmhtSqQcmS7aLgK9bmhI5qfr1K9p2 T9MaIhPfMGk+8FgIOijCIgKrK7Fy5R2MdSnF4vVDcYyAyh7pUWjTew0qid14nQ/8IxYS hpuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770385262; x=1770990062; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L4wcUhQ3FNh4u/EXh+x6aUXh5+ro8iD671/61i0x1bc=; b=N6kMFgvis5qbXp++qcGo3qZIb+0//x9rw9phub+I0+mG+Nt6CJRt1GBLhXs8tuniNM qjhwfBkZGd4fi66nlgQriDlUsbJUSxMzwUAv5mhCZjYT0KBkElNYBlFtyh8GOcNm6Su4 74rj1iS4v6I+FywU6AYDKArhcm8rQcRFhXG9McQpEziNT4m+0dC34wpdHbzkE1zaVbnK TRyz9lXWutUUMHLKG57BWB7s5OH6Rf96BU4ct8FbEALXPP3r5NQyJz3JLohK0Ht+hQSN ZAaanY79IfOhK7piento2Ko3MolUjdzjExF0dMk/psAVXQGsg41YgXsnssVSQMffbeqt BfMQ== X-Forwarded-Encrypted: i=1; AJvYcCU6/sM9Hj/9UvGLU1kfEWnbPSGTHVBwR2IHuP2rJsYYnGq2I5FNHuyJ9mlCEo/aNqHhhgnH1YCyxErkFkE=@vger.kernel.org X-Gm-Message-State: AOJu0YycYJE+iWz/rIwjBTxoI9VwxqNg+/zVPb5xrb+V4qDHrFFoH9bj N3RL2uwvTiFA0UUOddBvNG3TE7yt5I0d6DjINg5zttkJnev7xcRKcAAzdP4J8Wqv4Bc= X-Gm-Gg: AZuq6aKpHh0z9VwwxWt+5sxU/prU21ssmkUozNlAEFop5oo4FLpcGK7YrPfAXfFRc1Q Ksz3pQDmnKGaGG9ps4tClkV4Mqg/17hngPjT8D73blv/DS5jt1h9/CMVf/DNZIQ51CrKVQpbDDi u6oQ08TUvGQWzOy7CZ5CuVkM1ZGPAEWUbiri8PZxVp0OfOU81vuFAqQodEa4OvAUDsEyhN9XoBE J+QWnOgTiSfk68jNkiFZkZ+jWYDmF3Pd3sKDk+HYRo/coHmvAXlyQUyagzIvE3L88/dB7SlMJ1g uvq2FjaOdwX9cO5YjQI02S8xl0JIwfzWkCtfX58zoTRg/xzrFPG9sIkZ8vkJwYPMTR7zFDunuvE gheNfY4vOI7HaajGYEYdXtPxysjgD9NdLYir5xVyO2IzqCkfXOG0lwsxN8e+Q5VLGBM/zAAr2nj aIWHRXRuG1iyVSGwh6 X-Received: by 2002:a05:600c:4444:b0:471:1717:411 with SMTP id 5b1f17b1804b1-48320216ccemr42226725e9.24.1770385262076; Fri, 06 Feb 2026 05:41:02 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48317d835f0sm127113025e9.14.2026.02.06.05.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 05:41:01 -0800 (PST) Date: Fri, 6 Feb 2026 16:40:59 +0300 From: Dan Carpenter To: Timur =?iso-8859-1?Q?Krist=F3f?= Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, "SHANMUGAM, SRINIVASAN" , linux-kernel Subject: [bug report] drm/amd/display: Only poll analog connectors Message-ID: 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: [ Smatch checking is paused while we raise funding. #SadFace https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ] Hello Timur Kristóf, Commit f6cc7f1c11a7 ("drm/amd/display: Only poll analog connectors") from Jan 18, 2026 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:940 amdgpu_dm_hpd_init() error: we previously assumed 'dc_link' could be null (see line 931) drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c 923 /* 924 * Analog connectors may be hot-plugged unlike other connector 925 * types that don't support HPD. Only poll analog connectors. 926 */ 927 use_polling |= 928 amdgpu_dm_connector->dc_link && ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The patch adds this NULL check but hopefully it can be removed 929 dc_connector_supports_analog(amdgpu_dm_connector->dc_link->link_id.id); 930 931 dc_link = amdgpu_dm_connector->dc_link; dc_link assigned here. 932 933 /* 934 * Get a base driver irq reference for hpd ints for the lifetime 935 * of dm. Note that only hpd interrupt types are registered with 936 * base driver; hpd_rx types aren't. IOW, amdgpu_irq_get/put on 937 * hpd_rx isn't available. DM currently controls hpd_rx 938 * explicitly with dc_interrupt_set() 939 */ --> 940 if (dc_link->irq_source_hpd != DC_IRQ_SOURCE_INVALID) { ^^^^^^^^^^^^^^^^^^^^^^^ If it's NULL then we are trouble because we dereference it here. 941 irq_type = dc_link->irq_source_hpd - DC_IRQ_SOURCE_HPD1; 942 /* 943 * TODO: There's a mismatch between mode_info.num_hpd 944 * and what bios reports as the # of connectors with hpd regards, dan carpenter