Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp258254ima; Fri, 1 Feb 2019 02:55:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6eCqMRdWE3IwErD0jFVuwydkz+ohpubdaQ9yxuDGyRuJsuVFwyApnpP+4jXOjFf1tgnx3R X-Received: by 2002:a62:28c9:: with SMTP id o192mr39553004pfo.57.1549018505399; Fri, 01 Feb 2019 02:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549018505; cv=none; d=google.com; s=arc-20160816; b=Q4xjtU4xOK96y9a1Acy60P/GGPKkW6ewNe1TqyJfSjaEQU497XMI9baEvs0JKFGWen JNq9er8ssSaO8GCPafWY6F3qjKkrcUZ8isPIBzNWoQPBrgoBx3jvJmjEDlOlfDQXMIft MSqhDYNujaDrlaWu8wXmPrbq+Vcg8WKTV7j247ZQTBY3MpopFsm2qzDstPNOFinQ9KFQ phAUQyQKzD1Hp9JJgbViFKtzjBOuJhm0OsxCt327NG7Fk7ovsj4Sq2GRgQCP00l9neJw BUVKcqwu/F92Av15K7HTWs4ZCZ5cu2Ap9aF9+0sjs7edhEUMKE1d1Sww/AECFCr54r92 dtYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=oxiHxLeSnX8glUpUS5lX2lchiOhys+WWc1HeM1KrBUc=; b=Zj5JJ/NkBeiLgyrnOa5xYL6fxwtTnd8QeU0GM9NQ44lNza3ZTKKrXYkr5O44+C82/n +2BCpiWIBzI8OG8kDzhKNCL9odm+g/2/0j3a5HtS4fZTS8/SHdcUTmGbn1Diq/PSwwtc NRuQKgSZwu0mMXlZM4Xb1Zrg50G+mKNeGOumS3ZxVS39OdH9I9B27EffbaRvlwDTDRWZ 80jZxPSPJEz0iM7/BQncS0LVReBMxYU2l94fx38Ufkmo4nyVG/NU57nzS+wkmXkG6/rw nPOvqOph0sc92kdCm4bdnQP3Vndr6GB6UUv6BvtPQKNq5tnEpfwrtKfMPvz3isbjNiLH VFgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=YeYygnQv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si6420913pgi.260.2019.02.01.02.54.49; Fri, 01 Feb 2019 02:55:05 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=YeYygnQv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729948AbfBAKww (ORCPT + 99 others); Fri, 1 Feb 2019 05:52:52 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:49506 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbfBAKww (ORCPT ); Fri, 1 Feb 2019 05:52:52 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190201105250euoutp018689ac077afe180b8320dbcee4a9426c~-OABId0E82864528645euoutp019 for ; Fri, 1 Feb 2019 10:52:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190201105250euoutp018689ac077afe180b8320dbcee4a9426c~-OABId0E82864528645euoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549018370; bh=oxiHxLeSnX8glUpUS5lX2lchiOhys+WWc1HeM1KrBUc=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=YeYygnQvOfpAsgvZrQ4Xm803HHFuP/2gzD2pL/MrmKRuZaXyx9YnWR/Xfq3N2/wly aj7jC0fBeAyQ0QxpdlLq1HGhX4zP25B848p1v5c0XK42EzKw0XxefIY4Da7mn2FcnU zH2VNLMEfrHZ2xYnVeuI8gds/pah/KlmeP9k79fw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190201105249eucas1p2db685aee4e7158135ded89a6d0af90c5~-OAAc3ehg0527505275eucas1p2K; Fri, 1 Feb 2019 10:52:49 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 40.DA.04441.105245C5; Fri, 1 Feb 2019 10:52:49 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190201105248eucas1p1dbce88efd5483701cd36cc95b7d6891e~-N--fxfyk0372403724eucas1p1D; Fri, 1 Feb 2019 10:52:48 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190201105248eusmtrp23417df602f98cedd9ae7d9b921a9be51~-N--RL7NL0927609276eusmtrp2Q; Fri, 1 Feb 2019 10:52:48 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-a2-5c542501900b Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9C.29.04128.005245C5; Fri, 1 Feb 2019 10:52:48 +0000 (GMT) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190201105248eusmtip23c031219a9b52700566c7625644b00d8~-N-_1jZj93191231912eusmtip2U; Fri, 1 Feb 2019 10:52:48 +0000 (GMT) Subject: Re: [PATCH v1 0/19] drm/panel: drmP.h removal and DRM_DEV* To: Jani Nikula , Sam Ravnborg , Thierry Reding Cc: David Airlie , Sean Paul , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Stefan Mavrodiev From: Andrzej Hajda Message-ID: <65d0b3cc-9d6b-737b-ded6-25d4174c16a8@samsung.com> Date: Fri, 1 Feb 2019 11:52:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <87tvhnyf65.fsf@intel.com> Content-Transfer-Encoding: 7bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRj2O2c7OxOnxzn1xSJxmJaUFwpbGJIUtH4UKRZRVk49THFe2Ly0 LLISFUMKBS9DU7xNJVosL21GgUpzmJulSSqi1SQzZ5GZKF7yeJT893zP5XvfB14SF3Zxvcik 1AxamSpTiAlHTsfbZcthtD86Jnhp3U9SbDFjkuHFn4REO6RDkiFjFSFpXm5HkonSXiRZn8jD JMvGJ5yTpNSgmeBJO/9OcaVPzJHSyYcmTLpiDZWajGM8aUPZR0K6oN93gbzieCKBViRl0cqg 8FjHxKpWK5Fe53Wz5d4gNxctiYoQnwTqKJSszuJFyJEUUs0INjqsOCMIqT8IRl+fY4UFBHNj udydRPUvzXZCi6C4pZTDPuwIvrc1bbpI0o06BTUd3kxAROWARW9FjAenWhAUlU3zGIGgDsLa i1GCwQIqHOZ7bRiT5VC+ULAQydDu1GXoKZ5HrMUVzJU2DoP5lD+sTa9ufYNT3tBpr8JZ7Alj thqMmQWUhQctz+oJduvTUP+tkcdiN5g1tW3jvbBhYAIMvgv3K4dxNlyIoK9eux0Ogx7T+61i +ObSOmMQS0fAgzezWzR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0sgriTc0NTS3sDQ0NzY3NrNQEuc9b1AZJSSQnliSmp2aWpBaBNPHxMEp1cBofpEzXp9D qkFji/yLXGONoudiO9zzNYPOagcInFhvv7C4P/ZmWXWTlEcfi/Han/MY6h6aNbk0NolEnd+Y denOqpTrUirxgfN+JEtXzL/G2lGn/nWrytpdgRaKhn+7FXQ19oU/S1z24u5SLU4mWYMdPsUq WUv284h5T9nT8y7ptFF/d2D9XyWW4oxEQy3mouJEAE45lp/iAgAA X-CMS-MailID: 20190201105248eucas1p1dbce88efd5483701cd36cc95b7d6891e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190201102927epcas3p49ed77662feb619ac5977cccbbd98eac8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190201102927epcas3p49ed77662feb619ac5977cccbbd98eac8 References: <20190131192619.9763-1-sam@ravnborg.org> <20190131200723.GZ114153@art_vandelay> <20190131210312.GA8947@ravnborg.org> <20190131215417.GA13156@mithrandir> <20190201092037.GA9251@ravnborg.org> <87tvhnyf65.fsf@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.02.2019 11:30, Jani Nikula wrote: > On Fri, 01 Feb 2019, Sam Ravnborg wrote: >> Hi Thierry. >> >>> I personally like the DRM_DEV_* variants better because of the >>> additional information that they provide. That can be useful when >>> grepping logs etc. >>> >>> I'm slightly on the fence about this patch. The unwritten, and >>> admittedly fuzzy, rules that I've been using so far are that dev_*() are >>> used or messages that have to do with the panel device itself, whereas >>> DRM_* variants are used for things that are actually related to DRM. So >>> typically this would mean that roughly everything in ->probe() or >>> ->remove() would be dev_*(), while the rest would be DRM_DEV_*(). >> For a rookie like me it is much simpler if one can use the same >> logging primitives all over or at least the rules when to use what is simple. >> It is simple to say that everything that exists below drivers/gpu/drm/ >> relates to drm. >> >> Suggested set of rules to follow: >> - If in drm core, use DRM_XXX where XXX represent the core functionality >> - If in a driver use DRM_DEV* if a struct device is available >> - If in a driver and no struct device, use plain DRM_ERROR/INFO > Core and drivers are already pretty conflated: > > http://patchwork.freedesktop.org/patch/msgid/20181227162310.13023-1-jani.nikula@intel.com > > --- > > Side note, I'd like to switch i915 to dev based debugs, but I absolutely > hate the idea of changing: > > DRM_DEBUG_KMS("...") > > to: > > DRM_DEV_DEBUG_KMS(dev_priv->drm.dev, "...") > > I think the dev based macros are way too long, and would serve *most* > (though not all) drivers better by having struct drm_device * rather > than struct device * as the first param. In the above, just the > boilerplate consumes half the line. > > Basically I'd like to see drm_ prefixed analogues to all the dev_ based > logging functions, e.g. drm_dbg that takes drm_device. But it's so much > churn that I'm contemplating just making i915 specific wrappers > instead. :( Does it means I am the only one who is not convinced to use all these DRM_DEV helpers. For me classic dev_(err|...) looks fine, if we really want to emphasize that logs comes from DRM dev_* allows format modification, sth like this: #define dev_fmt(fmt) "DRM: %s:%d: " fmt, __func__, __LINE__ but it is still something I do not see very helpful. In general I think we have too many alternatives/flavours and developers do not know what to choose, current usage of all these DRM_* shows it clearly. Regards Andrzej > > BR, > Jani. > > > > >> If there is a need to distingush before/after one has a drm_device, >> the best way would be to have a set of logging primitives that >> take a drm_device. So we could extend the rule set: >> - If in a driver use DRM_DRM* if a struct drm_device is available >> (This rule would take precedence over a struct device) >> >> DRM_DRM*, or DRM_DDEV* or ... But you get the idea. >> >> But this is not where we are today. >> >> Shall I redo the patch-set so we go back to dev_*() in probe() / remove()? >> >> Sam >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel