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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6CBCC433FE for ; Wed, 22 Sep 2021 18:23:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF8F561350 for ; Wed, 22 Sep 2021 18:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237058AbhIVSZN (ORCPT ); Wed, 22 Sep 2021 14:25:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237053AbhIVSZL (ORCPT ); Wed, 22 Sep 2021 14:25:11 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E61BC061574 for ; Wed, 22 Sep 2021 11:23:41 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id m3so15644241lfu.2 for ; Wed, 22 Sep 2021 11:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YLXLTgVBlIsYGUnptVEmh5wmzNsWwAg5srFOANEsOjk=; b=BACF8CJscB+sTIFEZP8umRgC50ndWOAyAGfzm8SVDb+M7yhh1iuf4PiTO9E8ga42yF s6UGwMPJSebCCFGL4KFJ0G+2LtXZMqdn3pvHU1ZY+udIJV3CLTpXm43byp2fSF7pFOjM 17KgNVwZdr3cZLasbHyYPyzpqF9WlW/wi5I4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YLXLTgVBlIsYGUnptVEmh5wmzNsWwAg5srFOANEsOjk=; b=zVzbgvBrC+EFHhf4iyh9+hr2Nkj01cgLQ0X20k+bht3ccLKA1KY36T77v4crvtdrU1 KKMOwa2sISA5J5MG5hNHCWH2CWAQuDaUJaCkLuvmmw2TAvxJsLzQXt2F61tdaspFrhLm OpnqY3Uohnwh3/62VhBorq9cRyktqE7+6Hwl1WQLGKZgMTxl0aphrnB1QfW5pPb31hTk XZoQcJQ1O0TL9m0h10MyRg80tjph5hyO7TxNrAWaDCcx0pyxPsnsPQo5sNySEaF0q1H4 P07az+VQO2Trw73tWXMDTYnLyRj8x8fDrdovFofqBUH72sTxRTSoTJd5zLsT/OhS3lDX /ubw== X-Gm-Message-State: AOAM5329fDRcRJT6bZOxB6h1HbOYxhcP3aN6BYwlvp4ZfQrHxRyY6p4j IJe+0g+kIIJIm6NxBiaGqGold/c4wRuwaGz6Ar0= X-Google-Smtp-Source: ABdhPJygJBPk4fgkE3GIhRtWxXg2tFM0ifSdzyY6WBC27pEeKDzax3tidlvDa0tM0yJc38pU9sS9LQ== X-Received: by 2002:a05:6512:c2a:: with SMTP id z42mr374197lfu.664.1632335019393; Wed, 22 Sep 2021 11:23:39 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id l26sm234596lfh.247.2021.09.22.11.23.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 11:23:38 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id y28so15435687lfb.0 for ; Wed, 22 Sep 2021 11:23:38 -0700 (PDT) X-Received: by 2002:a2e:bc1e:: with SMTP id b30mr705404ljf.191.1632335018277; Wed, 22 Sep 2021 11:23:38 -0700 (PDT) MIME-Version: 1.0 References: <20210903160302.yh42vpkuob45dbpb@gilmour> <20210904091050.g5axxctgelciihjn@gilmour> <20210920144730.d7oabqfbx7pmyyfb@gilmour> <20210920154333.vunyxeshdb7jt5ka@gilmour> <20210920155350.h6624mt65vwg72p2@gilmour> <20210920171042.oq3ndp3ox4xv5odh@gilmour> <20210922095725.dk4vk42zb3kh7y6s@gilmour> In-Reply-To: From: Linus Torvalds Date: Wed, 22 Sep 2021 11:23:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regression with mainline kernel on rpi4 To: Sudip Mukherjee Cc: Maxime Ripard , Emma Anholt , David Airlie , Daniel Vetter , Philipp Zabel , dri-devel , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021 at 10:02 AM Sudip Mukherjee wrote: > > > Attached is a complete dmesg and also the decoded trace. > This is done on 4357f03d6611 ("Merge tag 'pm-5.15-rc2' of > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") drivers/gpu/drm/vc4/vc4_hdmi.c:1214 is tmp = (u64)(mode->clock * 1000) * n; in vc4_hdmi_set_n_cts(), which has apparently been inlined from vc4_hdmi_audio_prepare() in vc4_hdmi.c:1398. So it looks like 'mode' is some offset off a NULL pointer. Which looks not impossible: 1207 struct drm_connector *connector = &vc4_hdmi->connector; 1208 struct drm_crtc *crtc = connector->state->crtc; 1209 const struct drm_display_mode *mode = &crtc->state->adjusted_mode; looks like crtc->state perhaps might be NULL. Although it's entirely possible that it's 'crtc' itself that is NULL or one of the earlier indirection accesses. The exact line information from the debug info is very useful and mostly correct, but at the same time should always be taken with a small pinch of salt. Compiler optimizations means that code gets munged and moved around, and since this is the first access to 'mode', I would not be surprised if some of the calculations and accesses to get 'mode' might be moved around to it. Linus 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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2709CC433EF for ; Wed, 22 Sep 2021 18:23:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BED0260F11 for ; Wed, 22 Sep 2021 18:23:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BED0260F11 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1B7B6E02A; Wed, 22 Sep 2021 18:23:42 +0000 (UTC) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFDC46E02A for ; Wed, 22 Sep 2021 18:23:41 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id i4so15463756lfv.4 for ; Wed, 22 Sep 2021 11:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YLXLTgVBlIsYGUnptVEmh5wmzNsWwAg5srFOANEsOjk=; b=BACF8CJscB+sTIFEZP8umRgC50ndWOAyAGfzm8SVDb+M7yhh1iuf4PiTO9E8ga42yF s6UGwMPJSebCCFGL4KFJ0G+2LtXZMqdn3pvHU1ZY+udIJV3CLTpXm43byp2fSF7pFOjM 17KgNVwZdr3cZLasbHyYPyzpqF9WlW/wi5I4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YLXLTgVBlIsYGUnptVEmh5wmzNsWwAg5srFOANEsOjk=; b=4X5WOdxqlJNYBhQCkX7eoaCvwKpsOuLUTaM3X7Y75aa4mXd87T4q47B4yLOB76riEd ROMVxv9xmMnuqm1xiV4OZ/+CLl1qYnWtUvoLG7bYanHTqnWwMwl2de0YWgvxZ3Y0X9Ia lVmRQIPWTYA2gj46fB1qMl6LfShu677Buj2emQ4+P463wu45YplPrHgs/qvuysx9EsR4 wQ68rtK9HCw9mHpm+SKVhsASg9TjiICLkDcxsRRpvmI7jqYWswZpp/nXZml+a6thFvSF 8Wa1vX8iCtjHzWvw8amkQWCFomTIYD1ODAj+sqas6YjX8ffrt1hyYjaHUGnmBxNwjF7E Najg== X-Gm-Message-State: AOAM530GWSoTfeAKdrQ+FNrZuHakNO5vJuenCK8tMMWBpFbUvvtSm7Co 9mTGONuY7o2d8BWhNym+unsxq0TwoKFtyHHZSho= X-Google-Smtp-Source: ABdhPJwUTUVjs7DeoVOh/hc+aMwauG5Gltm8GMcGAR0dbbQ1Z04aCIQwzBrJxGXSdY81e/nDLx6Llw== X-Received: by 2002:a2e:8ec7:: with SMTP id e7mr693544ljl.486.1632335019326; Wed, 22 Sep 2021 11:23:39 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id s14sm329099ljh.38.2021.09.22.11.23.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 11:23:38 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id p29so15137741lfa.11 for ; Wed, 22 Sep 2021 11:23:38 -0700 (PDT) X-Received: by 2002:a2e:bc1e:: with SMTP id b30mr705404ljf.191.1632335018277; Wed, 22 Sep 2021 11:23:38 -0700 (PDT) MIME-Version: 1.0 References: <20210903160302.yh42vpkuob45dbpb@gilmour> <20210904091050.g5axxctgelciihjn@gilmour> <20210920144730.d7oabqfbx7pmyyfb@gilmour> <20210920154333.vunyxeshdb7jt5ka@gilmour> <20210920155350.h6624mt65vwg72p2@gilmour> <20210920171042.oq3ndp3ox4xv5odh@gilmour> <20210922095725.dk4vk42zb3kh7y6s@gilmour> In-Reply-To: From: Linus Torvalds Date: Wed, 22 Sep 2021 11:23:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regression with mainline kernel on rpi4 To: Sudip Mukherjee Cc: Maxime Ripard , Emma Anholt , David Airlie , Daniel Vetter , Philipp Zabel , dri-devel , linux-kernel Content-Type: text/plain; charset="UTF-8" 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 Wed, Sep 22, 2021 at 10:02 AM Sudip Mukherjee wrote: > > > Attached is a complete dmesg and also the decoded trace. > This is done on 4357f03d6611 ("Merge tag 'pm-5.15-rc2' of > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") drivers/gpu/drm/vc4/vc4_hdmi.c:1214 is tmp = (u64)(mode->clock * 1000) * n; in vc4_hdmi_set_n_cts(), which has apparently been inlined from vc4_hdmi_audio_prepare() in vc4_hdmi.c:1398. So it looks like 'mode' is some offset off a NULL pointer. Which looks not impossible: 1207 struct drm_connector *connector = &vc4_hdmi->connector; 1208 struct drm_crtc *crtc = connector->state->crtc; 1209 const struct drm_display_mode *mode = &crtc->state->adjusted_mode; looks like crtc->state perhaps might be NULL. Although it's entirely possible that it's 'crtc' itself that is NULL or one of the earlier indirection accesses. The exact line information from the debug info is very useful and mostly correct, but at the same time should always be taken with a small pinch of salt. Compiler optimizations means that code gets munged and moved around, and since this is the first access to 'mode', I would not be surprised if some of the calculations and accesses to get 'mode' might be moved around to it. Linus