Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1309947pxa; Sat, 15 Aug 2020 15:23:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPS+Mzdn/A9qEFtTQfbgKdAiK5cqIH1yERnTHGrWVOT6NfJoGrMtE6nAem1sHi41hAWsqM X-Received: by 2002:a17:906:6b87:: with SMTP id l7mr8177345ejr.198.1597530226395; Sat, 15 Aug 2020 15:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597530226; cv=none; d=google.com; s=arc-20160816; b=iB4wv7dJxIAvREY7L8WMdO0d1bL2aBUPYe7IsJvpaZuj1djiRQWykKyIG7CJG5vbqs Jhng7AOoEKvXI0Yrf0e2PFMKnUWr6gtuRgPrRKwcnuzt0JVUk/iibRufKDKHxPfkwVbX oLsfmAV5eckeeHWoVfrqM14XsvCHx7HmEv8ArroNz4/9VYJES4qCJsljtsEGYuFWbnkT /M9UZQsueWQTg/EVayC6iM9R4jaJ/VkKHmzhcqsY8TFmhadHXYUE2BDd4E0dPkCobs0H 20KK9ftuyO9/yUL+9wKZZ7X5MSyrjZDTpnT1tOT0LvPiWEyiGuu0/jnqvjkwjqxSu4PU xGNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=pqULLPTa/fPpTx1amcU0pbSdBgfz3CMJXeBmTKww5eQ=; b=dhT614gtj1WcAfXS7OnMAUnLfjNDpe31SgqM0bHfs1OAeNQhq2Wjy7mgHxqw0rdN3p yqztubbtA0600M92kHW2iPvrJ6yArjh+R61D4TC32YiZDlc42NXjDMo3jxMtW2vBspRr Ko+SfCXp+zXaTdsrxMg0m3ZWStyiQZSSg9Yvd5pt7G5pUqXy9yFrSAQQkKT6ECqylACe nSpHfQTrgbX8OX9Qfo8MY7Kp5eu7ZGYAJOp5/nU9D1TZPOxHD6ZyVsJW8QPH2iRNZSe1 tJy4LbqnP98UkeWV6+O6IhhN6FaTuZVscPH5OWdNaUbXlQ2diYqauuJrzQkIXyCOQ77C k+Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yl26si7986539ejb.625.2020.08.15.15.23.23; Sat, 15 Aug 2020 15:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728394AbgHOWWW (ORCPT + 99 others); Sat, 15 Aug 2020 18:22:22 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:53894 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbgHOWWU (ORCPT ); Sat, 15 Aug 2020 18:22:20 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 609DCFB04; Sat, 15 Aug 2020 18:26:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zdXwEJTZCE2k; Sat, 15 Aug 2020 18:25:59 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id AD998457CD; Sat, 15 Aug 2020 18:25:58 +0200 (CEST) Date: Sat, 15 Aug 2020 18:25:58 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Sam Ravnborg Cc: Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Arnd Bergmann , Linus Walleij , Heiko Stuebner , Daniel Palmer , Lubomir Rintel , Mark Brown , Kuninori Morimoto , allen , Mauro Carvalho Chehab , "David S. Miller" , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel Message-ID: <20200815162558.GA2744@bogon.m.sigxcpu.org> References: <0a7539135cc46eec5636ca89f52695f4a1197841.1597412076.git.agx@sigxcpu.org> <20200815100230.GA1002374@ravnborg.org> <20200815104022.GA5641@bogon.m.sigxcpu.org> <20200815104651.GA1005928@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200815104651.GA1005928@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sat, Aug 15, 2020 at 12:46:51PM +0200, Sam Ravnborg wrote: > On Sat, Aug 15, 2020 at 12:40:22PM +0200, Guido G?nther wrote: > > Hi Sam, > > On Sat, Aug 15, 2020 at 12:02:30PM +0200, Sam Ravnborg wrote: > > > Hi Guido. > > > > > > > +static int mantix_probe(struct mipi_dsi_device *dsi) > > > > +{ > > > > + struct device *dev = &dsi->dev; > > > > + struct mantix *ctx; > > > > + int ret; > > > > + > > > > + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); > > > > + if (!ctx) > > > > + return -ENOMEM; > > > > + > > > > + ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); > > > > + if (IS_ERR(ctx->reset_gpio)) { > > > > + DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); > > > > + return PTR_ERR(ctx->reset_gpio); > > > > + } > > > > + > > > > + mipi_dsi_set_drvdata(dsi, ctx); > > > > + ctx->dev = dev; > > > > + > > > > + dsi->lanes = 4; > > > > + dsi->format = MIPI_DSI_FMT_RGB888; > > > > + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | > > > > + MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; > > > > + > > > > + ctx->avdd = devm_regulator_get(dev, "avdd"); > > > > + if (IS_ERR(ctx->avdd)) { > > > > + ret = PTR_ERR(ctx->avdd); > > > > + if (ret != -EPROBE_DEFER) > > > > + DRM_DEV_ERROR(dev, > > > > + "Failed to request avdd regulator: %d\n", > > > > + ret); > > > > + return ret; > > > > + } > > > > > > Consider to use the recently added dev_err_probe() here and below. > > > Note: Not part of drm-misc-next yet - but hopefully after -rc1 > > > when a backmerge is done. > > > > In fact I did decided against it since i was told that missing dev_* and > > DRM_* logging shouldn't be done. So is that o.k. nowadays? > s/missing/mixing/ > > I often request that logging is consistent - so I recognize the > argument. > > For panel/* I have not made up my mind what I think is the best > approach. The DRM_DEV_* and DRM_* logging do not add much value. > So I have been tempted several times to convert all logging in > panel/ to dev_* and pr_* (when no struct device * is available). > That would also avoid that we mix up logging. > > We have drm_* logging - but they require a valid drm_device * which we > do not have in the the panel drivers. So they are ruled out here. > > Do you have any opinions/comments on this? I think for panel drivers DRM_* does not give any bonus so moving to {dev,pr}_* sounds good. I just wonder if other drm parts don't need `dev_drm_err_probe()` (or similar) anyway. But then maybe dyn_debug is enough nowadays to not need DRM_DEV_DEBUG_* either? Cheers, -- Guido > > Sam >