Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp123741ybx; Fri, 1 Nov 2019 00:20:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6AwdilLpwItmUfrFXjKkFfCjZFTHQEgYqYQR7BD27Nu4Z35U6xJMDWCiBsR4F8hgTM2rh X-Received: by 2002:a17:906:318e:: with SMTP id 14mr8394091ejy.5.1572592823739; Fri, 01 Nov 2019 00:20:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572592823; cv=pass; d=google.com; s=arc-20160816; b=XrfV+6WiFLABLXaxcsxUSgPalqDn9mPV8XaBKGZkYGKnPbqvQgK0HN1hm7ooLbO8XV gozASqQpPCdI+a0l4CuZDQYwkMKsY5q6/NyYURPWKdXYKZqwJzwtVHQuxQDVgDIgCC7x O54U/8K/h53au8ba/wiZ2FsjZ8g/7HnIJd9AabOgW1e9dj8QogtmeEbySmF2LiJGJ9+8 zHSdqgCS2/kFeqVX1XXJemgHZd0a2KnCT0ToS2vDTNY3EBm6Zt5PLRGu6XL4C1nPR0rG O0dSqKeOdHRNHgjKK/PH05p66Fj6yhSp3+ku0VWoT2rSbavCp4/7YDn2TJ9cqgTmS1yG hMvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:nodisclaimer :original-authentication-results:mime-version :content-transfer-encoding:content-id :authentication-results-original:user-agent:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-signature; bh=z7nUPmbf/5TwYW064wsEhUXruAzCIoVKDDCEmziHApg=; b=wH1VoMpaluE7kp8d+Smtx6Hsw54muD/bVarC8JARRLEuJCL01fZL35nbA/8owZDKUC eENsb1HuRBk93OjKK7olGEI4Gt8cbnjrWy4dxDhwaZhG4A3OCuQHb1ujTHO8aJ/02Rhw CfUrwkjzGpbDSBCBruLmeLLKPwmQCjk/ahXEMJ7TxIQ3rzosqi7jYo7nTfEmSQP0Tic8 7C6A4/DRmKm6kAziotQlxcj0vlZ6UYm7V4VbT13d0j5nnkyJvK+Kwm8TsDN+YUfratic MlKlSKz8VZyZLXzrKo+J6tEyz4zsX3oMpTT1XhuL9ne2JYaFk84Z7Qdsl0tpYLCMpwGr cPgA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bpJzMIiy; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bpJzMIiy; arc=pass (i=1 spf=pass spfdomain=arm.com dkim=pass dkdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gg9si5045841ejb.438.2019.11.01.00.19.58; Fri, 01 Nov 2019 00:20:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bpJzMIiy; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=bpJzMIiy; arc=pass (i=1 spf=pass spfdomain=arm.com dkim=pass dkdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729942AbfKAHRU (ORCPT + 99 others); Fri, 1 Nov 2019 03:17:20 -0400 Received: from mail-eopbgr30077.outbound.protection.outlook.com ([40.107.3.77]:16534 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726132AbfKAHRU (ORCPT ); Fri, 1 Nov 2019 03:17:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z7nUPmbf/5TwYW064wsEhUXruAzCIoVKDDCEmziHApg=; b=bpJzMIiyz6JCMLJZAuAl855Sisyje4inq+oCj7UiPf8GyZeeRPXgto+QNdU7FmPkFbjngVIt25iNLDjODEeHVRsIbFKY27hUyZgeMLtRfzPUi3B2u+RaKB7tpEcyb2lcaOQpf7IYpjqkYAMw5KMFgVVhKsSaebmvV4YBR+65cko= Received: from VI1PR08CA0176.eurprd08.prod.outlook.com (2603:10a6:800:d1::30) by DB6PR08MB2933.eurprd08.prod.outlook.com (2603:10a6:6:1c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.24; Fri, 1 Nov 2019 07:17:13 +0000 Received: from VE1EUR03FT021.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::202) by VI1PR08CA0176.outlook.office365.com (2603:10a6:800:d1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.20 via Frontend Transport; Fri, 1 Nov 2019 07:17:13 +0000 Authentication-Results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; vger.kernel.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;vger.kernel.org; dmarc=none action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT021.mail.protection.outlook.com (10.152.18.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20 via Frontend Transport; Fri, 1 Nov 2019 07:17:13 +0000 Received: ("Tessian outbound e4042aced47b:v33"); Fri, 01 Nov 2019 07:17:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 29d78dff668dd3a0 X-CR-MTA-TID: 64aa7808 Received: from 144da546acf0.2 (cr-mta-lb-1.cr-mta-net [104.47.8.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 52E326CF-B048-4AFA-88C1-DD29D26F6648.1; Fri, 01 Nov 2019 07:17:07 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2056.outbound.protection.outlook.com [104.47.8.56]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 144da546acf0.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 01 Nov 2019 07:17:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kaH1o/DISyR7t6WD3gppWzo/5XfpEK5lcWEgkVSul2MDEMHnKheqqPHRyUdX+FRQ6sp8ffw1DZUFUrvTDJSmCJvYdxixFJvjIy6qxR6yUPcztxJWWUhRKPkj0lomVbg3C0nn+i4gjLDw+/goRRuFfuYy88WRaWrIJlFbxH5nXWs5WAte4BuARPfEGgmVDRhcjySRDw/D42dAtZO8O6vXYhf9NfPfb8dmqLaoNoS4neW0KqFdMDHCR3R0HgpWH98J/mXS+ljgldWYKdQdhijaG/ATp76DzWESvO5mvvPzQk9p0rF0gO7DB4wKH8TdHbfPsmlWsVutFsU/LRxPPM/n9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z7nUPmbf/5TwYW064wsEhUXruAzCIoVKDDCEmziHApg=; b=GZlesaLmISxT7vsmd6TsbVG2AiIiGEGhFBd9dVVtvzJmlM0be3Oz9QgAWCI36ORLl+eY+O+R3siYLaK0Qqsoix90Xyzp8oRlGYbbVK9h5fGIePeI+2SJ0VFoUsyTrW2A9nwEOQKXSs55Mvi4lCvL3sqLIBDDwYcwcCsgjK+omCgQTec42wDHrZ5UkIYVS1Xmlos6ZhZVdAv7csbn54lVkQoK1qZqwGyAtwcb84peGFYwIZn9ZYk8nmhYR16BJTddppqfOWTmaz/Sf01HKfy7iPWh8olwdCBWXFyFgNIZvp9ss14SYkeSNDtq6yDX7i4TEEe8AXU23IGOeSH5CurCKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z7nUPmbf/5TwYW064wsEhUXruAzCIoVKDDCEmziHApg=; b=bpJzMIiyz6JCMLJZAuAl855Sisyje4inq+oCj7UiPf8GyZeeRPXgto+QNdU7FmPkFbjngVIt25iNLDjODEeHVRsIbFKY27hUyZgeMLtRfzPUi3B2u+RaKB7tpEcyb2lcaOQpf7IYpjqkYAMw5KMFgVVhKsSaebmvV4YBR+65cko= Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4974.eurprd08.prod.outlook.com (10.255.158.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.17; Fri, 1 Nov 2019 07:17:06 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::a809:417a:faf3:61a7]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::a809:417a:faf3:61a7%6]) with mapi id 15.20.2387.030; Fri, 1 Nov 2019 07:17:06 +0000 From: "james qian wang (Arm Technology China)" To: Mihail Atanassov CC: "dri-devel@lists.freedesktop.org" , David Airlie , Liviu Dudau , "linux-kernel@vger.kernel.org" , "Lowry Li (Arm Technology China)" , nd , Sean Paul Subject: Re: [3/5] drm/komeda: Optionally dump DRM state on interrupts Thread-Topic: [3/5] drm/komeda: Optionally dump DRM state on interrupts Thread-Index: AQHVkIRdkRYOh8AuQkiwt0Vv1/Eykw== Date: Fri, 1 Nov 2019 07:17:06 +0000 Message-ID: <20191101071659.GA30189@jamwan02-TSP300> References: <20191021164654.9642-4-mihail.atanassov@arm.com> In-Reply-To: <20191021164654.9642-4-mihail.atanassov@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.10.1 (2018-07-13) x-originating-ip: [113.29.88.7] x-clientproxiedby: HK0PR03CA0068.apcprd03.prod.outlook.com (2603:1096:203:52::32) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c1926b1f-cc71-4489-9310-08d75e9b84b7 X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:|VE1PR08MB4974:|DB6PR08MB2933: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 020877E0CB X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(7916004)(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(199004)(189003)(25786009)(8936002)(6486002)(6246003)(81166006)(229853002)(14444005)(7736002)(71190400001)(476003)(478600001)(5660300002)(486006)(256004)(8676002)(2906002)(3846002)(71200400001)(305945005)(81156014)(6116002)(64756008)(55236004)(66446008)(102836004)(66066001)(66556008)(86362001)(6506007)(4326008)(186003)(6512007)(66476007)(6436002)(316002)(386003)(6862004)(76176011)(99286004)(26005)(54906003)(14454004)(52116002)(33716001)(9686003)(446003)(11346002)(1076003)(58126008)(6636002)(33656002)(66946007);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR08MB4974;H:VE1PR08MB5006.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: v8iB8w+gQYQTyhPc1S2KQy1aXfUF/eIdc41px5QGbTyugAX/N5rLybWgY6XhAM9cO3GnXmOsAjzT3ka03ifzjP4Sgqh0LUVjo/9gmnZTjuzBHksgdbeF5yyKmW9FKt0aCIpmGFfFJddIafgwksTmHtWXnyMhW0mdjAkfb9Wp3VGePet4OV0lQwREcOCu+qmjvEwlL6s8/BkAJhW6uWqWg+N9s+Dw63EvVq+syhlo86fKe2yx8Uik2OszthB08nI4ignNPMdcrrZ4xomfsLBQpptpgLAVNu83IQ3ju8pabmGjg0/c6IizmldvS2qIZ/HES8nWfQeqj1LUEFkpiMDiwNMLBILz0B7TZApifyYIAfjkLNPM+ei9x6oPByEGnlpOyXSNMFb51jFCbwtWWKlEmDG+58WgI+sDRmIUqAHmXkvE8S5o/4GAEEJ2NeZ7y4xB Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4974 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT021.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(7916004)(4636009)(39860400002)(346002)(136003)(376002)(396003)(1110001)(339900001)(199004)(189003)(47776003)(54906003)(9686003)(186003)(26005)(66066001)(58126008)(316002)(33716001)(3846002)(26826003)(6116002)(86362001)(36906005)(2906002)(486006)(23726003)(25786009)(6246003)(102836004)(4326008)(76176011)(46406003)(6862004)(6506007)(386003)(107886003)(126002)(478600001)(105606002)(14454004)(446003)(97756001)(336012)(6486002)(11346002)(6512007)(476003)(50466002)(229853002)(8676002)(81166006)(76130400001)(81156014)(8936002)(8746002)(14444005)(33656002)(70206006)(70586007)(22756006)(5660300002)(99286004)(1076003)(7736002)(305945005)(6636002)(356004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR08MB2933;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:Fail;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;A:1;MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 26127c99-a39f-4146-88bb-08d75e9b8028 NoDisclaimer: True X-Forefront-PRVS: 020877E0CB X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Uionmm8hEXWFJaIdv7z7+no+hH86t+IE4VidWrA2sOFanJTWX9DhdW2OGWOHd2aLpSXQctLVCHeLYfPIPyUICpj+Gwbw+4G7srOu24ykl+YayTSkYwSolA9t1qJsdXOiS+/HB6oKAp7t3Ycl+dEngcYKqPFmPuFTYCr3DRIKWYkkYPP9HRP0CBvyRCzUrXzC3bagOvBgNkS1Tc7koVB/ul2kHLsBUW+5O2kQaWhboTNMsDrDuFByt5n2xQirQQVZCwHXNVbqC0KD/59MuIiLpLg4rgWoh7bDGVuKpq4/LYdw2EWd9rG8tIgwCPAFJ1JXsFISnprabyKqG+t/H4T8zsiOW4hnFJWrmqGTfnY6oJuZ+hmpKOIr63NbNfRHR0hj8UkBkLa8X6jUXsBrqVkUWthBGNecR1ksDz5n8j+t/KBfTLcVEbHAqtAxCXi89HSG X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2019 07:17:13.4748 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1926b1f-cc71-4489-9310-08d75e9b84b7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2933 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 21, 2019 at 04:47:24PM +0000, Mihail Atanassov wrote: > It's potentially useful information when diagnosing error/warn IRQs, so > dump it to dmesg with a drm_info_printer. Hide this extra debug dumping > behind another komeda_dev->err_verbosity bit. >=20 > Note that there's not much sense in dumping it for INFO events, > since the VSYNC event will swamp the log. >=20 > Signed-off-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 5 ++++- > drivers/gpu/drm/arm/display/komeda/komeda_event.c | 8 +++++++- > 2 files changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gp= u/drm/arm/display/komeda/komeda_dev.h > index 831c375180f8..4809000c1efb 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h > @@ -205,11 +205,14 @@ struct komeda_dev { > /** > * @err_verbosity: bitmask for how much extra info to print on error > * > - * See KOMEDA_DEV_* macros for details. > + * See KOMEDA_DEV_* macros for details. Low byte contains the debug > + * level categories, the high byte contains extra debug options. > */ > u16 err_verbosity; > /* Print a single line per error per frame with error events. */ > #define KOMEDA_DEV_PRINT_ERR_EVENTS BIT(0) > + /* Dump DRM state on an error or warning event. */ > +#define KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT BIT(8) > }; > =20 > static inline bool > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/= gpu/drm/arm/display/komeda/komeda_event.c > index 575ed4df74ed..5da61e7d75d5 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c > @@ -4,6 +4,7 @@ > * Author: James.Qian.Wang > * > */ > +#include > #include > =20 > #include "komeda_dev.h" > @@ -113,6 +114,7 @@ void komeda_print_events(struct komeda_events *evts, = struct drm_device *dev) > static bool en_print =3D true; > struct komeda_dev *mdev =3D dev->dev_private; > u16 const err_verbosity =3D mdev->err_verbosity; > + u64 evts_mask =3D evts->global | evts->pipes[0] | evts->pipes[1]; > =20 > /* reduce the same msg print, only print the first evt for one frame */ > if (evts->global || is_new_frame(evts)) > @@ -123,9 +125,10 @@ void komeda_print_events(struct komeda_events *evts,= struct drm_device *dev) > if (err_verbosity & KOMEDA_DEV_PRINT_ERR_EVENTS) > print_evts |=3D KOMEDA_ERR_EVENTS; > =20 > - if ((evts->global | evts->pipes[0] | evts->pipes[1]) & print_evts) { > + if (evts_mask & print_evts) { > char msg[256]; > struct komeda_str str; > + struct drm_printer p =3D drm_info_printer(dev->dev); > =20 > str.str =3D msg; > str.sz =3D sizeof(msg); > @@ -139,6 +142,9 @@ void komeda_print_events(struct komeda_events *evts, = struct drm_device *dev) > evt_str(&str, evts->pipes[1]); > =20 > DRM_ERROR("err detect: %s\n", msg); > + if ((err_verbosity & KOMEDA_DEV_PRINT_DUMP_STATE_ON_EVENT) > + && (evts_mask & (KOMEDA_ERR_EVENTS | KOMEDA_WARN_EVENTS))) > + drm_state_dump(dev, &p); > =20 > en_print =3D false; > }