Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2439865ybi; Thu, 18 Jul 2019 08:24:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzia1wenkXUd9nYt+BtfZg8VtiCWoGVRbXvNyONZYJR9LZC0eZMopnnLyeiL6FCkIkXbDQl X-Received: by 2002:a63:7455:: with SMTP id e21mr42817263pgn.439.1563463476384; Thu, 18 Jul 2019 08:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563463476; cv=none; d=google.com; s=arc-20160816; b=QzQV/D6TaOXCyk9163yxUcMEss1cBE27ZEIYaQ+vB747Kiy1gzf3Tiye4Wtv6ilOOW So4DKUzHkqx0lDxoaUK6V/F0H/L+EM1IG0SlgWrAXtFf8OYTPqHE6SPfkHQzg1hDul6q n2F8/7Hla9Z48FAUVf0stkfeK62BVx3qHgihB1YzrcoHw9eSAitmxtnHbMduD3y96Kxb bbuo7dV0KG9L9VUyCbiXz14r1o+d8Yf+/Ss6C/3MYR4/oO3PGrAfQ45J18IZVnge7Lge BQel7uYkKFk8j6FU+I0pwCGq1XK4EtyCV1+RjFN/Tihsf3Rnx6FwStdSpCY6hQjPi1wO N2yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WNiVs/zOlaxMgnUWU86FyaftSbm6ryQPjqyll3zSd7Q=; b=PJ6J++n4oAEs681lvqotBEsivLR7uanZ8BcG59t+W/KVxPGHzGTCUBRsXV4EvLVRL3 HpIse6aKiJm6sFLuKNF47o2ILURUyTvXYjqegjgo5c6U5KQfKTOjhHU9s6tyXNty9uPf zoW4nOQeD2WWNsNfAZW0M6tAt7sbpm4OaTcH5p7Khdruj6UXaJ5tuZM+CBVzcY7Bh3Ov xH+qMB1SGVXuxHlNEtX0tRDVDDHJ2Q5scJiUw6KBxpuJKMZvqR5hqCP40CLPVZ2OdFxC 5FAQTyCDE1DznWbDMZvGQKDO071J/HjjRVO+7klbR8VsRZvXD7bMQktX3SQ6DBm5IwHG PKMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=aNeIpJVd; 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 j14si4458720pgk.107.2019.07.18.08.24.18; Thu, 18 Jul 2019 08:24:36 -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=@poorly.run header.s=google header.b=aNeIpJVd; 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 S1728008AbfGRPXx (ORCPT + 99 others); Thu, 18 Jul 2019 11:23:53 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:43386 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbfGRPXw (ORCPT ); Thu, 18 Jul 2019 11:23:52 -0400 Received: by mail-qk1-f195.google.com with SMTP id m14so20707037qka.10 for ; Thu, 18 Jul 2019 08:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=WNiVs/zOlaxMgnUWU86FyaftSbm6ryQPjqyll3zSd7Q=; b=aNeIpJVdfnDhyIUT2LAXagP7hoA7Rh25uvo/HHVFsCpBrjupsYt4NhQaL0dOF93ewa oP+HJmgYhPLpUCdx/O/PMX/j1h1kw4h1IZwvvAiSCnN0mVd6SRT6JzlwXWTKGWoKVKZz na0PYmDkNh2V2hGj9NTYQytJvXcrkF2O44nFHXgdxiLRknegEEjcX7lX5C1UNHb11NTe 9lWPynxuTVev8aJFEVI9VwuYxIz9b3OMKabpt/RXNsdbbfHRxMSIqV4DRVgjKjMGdQ4a CsSmwEcoj1j7qyWN2m093ietZTMi7X/hw3uBIgAcC+na0VUCiSiFlACmANmGt+tsklM0 WDMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=WNiVs/zOlaxMgnUWU86FyaftSbm6ryQPjqyll3zSd7Q=; b=mGx9HYuOJ4q3q+w+9SbS9HU1lEDe2aQuns2MEjFnJj8q+s+5Mx63xyOqT8tMS+qXCR Gkkkcr2a8f1dRJpFXBWAkNlBsVAvJ0hz5Ci1jRxoKDSdLvLP+ZcTmWlUUEnnTJLEbvfM 3w9Jfx3iYCJmOLUA3A65vK/Elb2XXAAWXLV+65vQh7P0nioV6VjskSz1DnLvz3zymWWL BmYR5JwT8OLkstHOx7FutUyqLudb/EjJOWVV5ppYQlX+00axSA1EJMefctW2Zw+udJgv utXGWvXMHNojtX4H2OgjrTFsYmuoPhzhGkrszhi+VdF+c29NvHLiXgN0UH2W+nusHgrI 0VTg== X-Gm-Message-State: APjAAAWNReUwNtkD8kw9LGDYpN5dn6eRDWleI/JkjoCSNwegjGBc2zQc b83eapPJcfu6usVTPo+/AX1JSw== X-Received: by 2002:a37:8d04:: with SMTP id p4mr31358574qkd.113.1563463431641; Thu, 18 Jul 2019 08:23:51 -0700 (PDT) Received: from localhost ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id r40sm15914278qtk.2.2019.07.18.08.23.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 08:23:51 -0700 (PDT) Date: Thu, 18 Jul 2019 11:23:50 -0400 From: Sean Paul To: Liviu Dudau Cc: "Lowry Li (Arm Technology China)" , "james qian wang (Arm Technology China)" , "maarten.lankhorst@linux.intel.com" , "seanpaul@chromium.org" , "airlied@linux.ie" , Brian Starkey , "Julien Yin (Arm Technology China)" , "Jonathan Chai (Arm Technology China)" , Ayan Halder , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , nd Subject: Re: [PATCH] drm/komeda: Adds error event print functionality Message-ID: <20190718152350.GC31819@art_vandelay> References: <1561604994-26925-1-git-send-email-lowry.li@arm.com> <20190718131737.GD5942@e110455-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190718131737.GD5942@e110455-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 18, 2019 at 02:17:37PM +0100, Liviu Dudau wrote: > On Thu, Jun 27, 2019 at 04:10:36AM +0100, Lowry Li (Arm Technology China) wrote: /snip > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c > > index 647bce5..1462bac 100644 > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c > > @@ -47,6 +47,8 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data) > > memset(&evts, 0, sizeof(evts)); > > status = mdev->funcs->irq_handler(mdev, &evts); > > > > + komeda_print_events(&evts); > > Calling this function from the IRQ handler is a bad idea. We should use debugfs > if you really want to have a trace of the events, but I personally don't see > value in having this functionality in the kernel at all. You can expose the > value of the evts->global and evts->pipes[] as integers and decode that in > userspace or as a debugfs entry. Alternatively, consider using kernel trace events. They allow you to selectively turn on/off certain events and also allow you to customize which data is recorded and how it's formatted. Seems like a good fit from the quick scan I've done. Sean > > Best regards, > Liviu > > > + > > /* Notify the crtc to handle the events */ > > for (i = 0; i < kms->n_crtcs; i++) > > komeda_crtc_handle_event(&kms->crtcs[i], &evts); > > -- > > 1.9.1 > > > > -- > ==================== > | I would like to | > | fix the world, | > | but they're not | > | giving me the | > \ source code! / > --------------- > ¯\_(ツ)_/¯ -- Sean Paul, Software Engineer, Google / Chromium OS