Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2815973rwb; Mon, 19 Sep 2022 10:20:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lI67CmzBp5rSvYZAlbxb7ZPU9FbN8kwNZ8ZHCiZN573fJ2k6SUx+4dhubcMuxJfYCXBo1 X-Received: by 2002:a17:907:75f7:b0:77b:4579:2aee with SMTP id jz23-20020a17090775f700b0077b45792aeemr13765527ejc.529.1663608004152; Mon, 19 Sep 2022 10:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663608004; cv=none; d=google.com; s=arc-20160816; b=KIltwvQHL2bZDU+jmwGTsEutt9BIHOs1nJE1Zgmy/3m7GF0vqi/umYXvsimDQ4nWkG j2qJqCaITdb/cnFJjUIY5N9sM+lXCapMSibI1NRcaCkKo8kxKfP2Aq476c16b9EHgmbA nnrAroFv56ignSMcMucRt+VUCbGw0kYfEVR9wN7FO8oewC1twVeHIBqdAvX4+UOwuaW7 EqHFeS6Xo2Ej+Bni65xCcqcCP0asgj3nf2Sua5QHNYbj00piVlsxsEiNEfCrCqOyG1cC WK49RrS9ewywdyDs8+FEl1EFFEMx0wyL/3TfxYEk2Me7HErGkAK5RgLZV73rgR1yV1V+ HZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZLiOCNNF7wdWCABGAiGK8/oWijAvCIwWJHaJzbioRxM=; b=yaCnt6x92d476oGHzoOUsy7Q8EeEPkxWIz65voY+1tM6l2yV5QjNwXWLYcNdW3qHA6 dyaLal1O3i6Kyugn9TyHsSP8EaIYRtkvvU9bulZ61RlYG+qfH0PQiCK0Lb+Fhk++hiAR VrsXtsFfcvImBpcKHwboFZxgBjJ5Cz7N08AraTZ1w4+rYZvLvVyR3dR3pO5UjfoBIgwP lubXXaYrYgKP9kb6AEbpBTCZ0yeImL0f0Pe4W89B91D3ZJJczTSB7sANbJREgPMiSJu7 4fGcCfwyqZWhF1GGMxsQunh/5iEdQCNUG9HcsS1uzNK5EzujV1xdC9ypbwkRmhIQIsxn Ex/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nY+pSkSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw2-20020a170907770200b00741a0720a2bsi24081037ejc.814.2022.09.19.10.19.38; Mon, 19 Sep 2022 10:20:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nY+pSkSN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbiISQeO (ORCPT + 99 others); Mon, 19 Sep 2022 12:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229686AbiISQeL (ORCPT ); Mon, 19 Sep 2022 12:34:11 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E18F03C8DA for ; Mon, 19 Sep 2022 09:34:06 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id u6-20020a056830118600b006595e8f9f3fso7982475otq.1 for ; Mon, 19 Sep 2022 09:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=ZLiOCNNF7wdWCABGAiGK8/oWijAvCIwWJHaJzbioRxM=; b=nY+pSkSNHqCwgtOKWBI3vQ+7D3KMosqNkG9NQy+uhbnu5FMJZkFy8tjyyEXUhOBDv+ nYPaJDkq+xFcrYLY0JkhfgmUY+NcDQQpL0Im6CoXPfPRUE8ZYzmm/q2rVBZAEldwA5wY JD4qMfqJrkDkjjXkUm7bQqhDzMraaOF45/LpssN8HoilzMlg10z2/G1F9aGRVva3fwSi 2hYDZ3ECKF18w+c1Vlumuks5PYGholLxd6uMqdKLLxWQX2IVeBKvFgdIwWBOr9QvrZ+M +mm6RcrmwWSq/ApAM0DtxDlSd0tEtWOGUDZPHVHxq39ofhSbwjC30rR1zeVEK0Y69xUL nMCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=ZLiOCNNF7wdWCABGAiGK8/oWijAvCIwWJHaJzbioRxM=; b=2I1eoRDCj+YMfUrIT+E30ygOfeD9BuC0qrXUUBpf8wZSZCRIXv6Mx9guLgte6/UnMc jlNJmKLuIC5ba0JyTOYVogLNb4OaJzX3b3GD9RYiv69+eQ4jWWKzoqi9YiQ2BhS0X4cW 2pStqdi8vg1+CRsyrFxY/FY5X34V3KH2KMlaF+aYmqjvHwEVIOItaoZzsMJfDLT54Otk PziIDsloj90Vhwjqbe0xFekgP3g+XPzfBwaoEpovEUnN8AMpbHNGurGM2IMRFRkeMPZE LP34xwIXEAJr6+CJm7STz5ZtoJMfmrP3rRXNVAM0O22iguv/XdjvbE/c5SqqyY0XID7F m1+Q== X-Gm-Message-State: ACrzQf10j0vo/wSd1TAaBBmd+rnNNGIQ2S2o+PKDJNBKRjS3L7hoIjar ItrEipW/kYqkJL2wrtpl/ZfdIRKF0OFpXYN2sic= X-Received: by 2002:a9d:376:0:b0:655:b4bc:fd6e with SMTP id 109-20020a9d0376000000b00655b4bcfd6emr8479616otv.233.1663605245951; Mon, 19 Sep 2022 09:34:05 -0700 (PDT) MIME-Version: 1.0 References: <20220918120926.10322-1-user@am64> In-Reply-To: <20220918120926.10322-1-user@am64> From: Alex Deucher Date: Mon, 19 Sep 2022 12:33:54 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: use dirty framebuffer helper To: root Cc: Xinhui.Pan@amd.com, airlied@linux.ie, alexander.deucher@amd.com, amd-gfx@lists.freedesktop.org, aurabindo.pillai@amd.com, christian.koenig@amd.com, dri-devel@lists.freedesktop.org, greenfoo@u92.eu, guchun.chen@amd.com, hamza.mahfooz@amd.com, linux-kernel@vger.kernel.org, seanpaul@chromium.org Content-Type: multipart/mixed; boundary="000000000000bb74c905e90a4789" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000bb74c905e90a4789 Content-Type: text/plain; charset="UTF-8" On Sun, Sep 18, 2022 at 8:09 AM root wrote: > > Hi, I recently experienced lock-ups that only responded to magic sysreq > reboots when the amdgpu module was loading on my pc (Athlon II X4 640 CPU, > with Radeon R7 250 - Cape Verde). > > .config has: > > CONFIG_DRM_AMDGPU=m > CONFIG_DRM_AMDGPU_SI=y > # CONFIG_DRM_AMDGPU_CIK is not set > # CONFIG_DRM_AMDGPU_USERPTR is not set > > kernel command line has: > > amdgpu.audio=1 amdgpu.si_support=1 radeon.si_support=0 page_owner=on \ > amdgpu.gpu_recovery=1 > > Bisecting lead to: > > commit 66f99628eb24409cb8feb5061f78283c8b65f820 > Author: Hamza Mahfooz > Date: Tue Sep 6 15:01:49 2022 -0400 > > drm/amdgpu: use dirty framebuffer helper > > Currently, we aren't handling DRM_IOCTL_MODE_DIRTYFB. So, use > drm_atomic_helper_dirtyfb() as the dirty callback in the amdgpu_fb_funcs > struct. > > Signed-off-by: Hamza Mahfooz > Acked-by: Alex Deucher > Signed-off-by: Alex Deucher > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > index c20922a5af9f..5b09c8f4fe95 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > @@ -38,6 +38,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -496,6 +497,7 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector, > static const struct drm_framebuffer_funcs amdgpu_fb_funcs = { > .destroy = drm_gem_fb_destroy, > .create_handle = drm_gem_fb_create_handle, > + .dirty = drm_atomic_helper_dirtyfb, > }; > > uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev, > > After doing a git bisect reset, git pull and reverting the patch above, I > rebuilt the kernel and am successfully running with the amdgpu module loaded > and using the Radeon R7 250 GPU. > > I am happy to supply any further configuration details. Does the attached patch help? Alex > > Arthur Marsh. --000000000000bb74c905e90a4789 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-drm-amdgpu-don-t-register-a-dirty-callback-for-non-a.patch" Content-Disposition: attachment; filename="0001-drm-amdgpu-don-t-register-a-dirty-callback-for-non-a.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l88zlnu70 RnJvbSA1ZTQ5YzY4YzFhYzFmYmI5OGIxYzg0NDA3NDg1YWJmYjdkMzA5NzgzIE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