All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Murthy, Arun R" <arun.r.murthy@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: RE: [PATCHv3 6/6] drm/i915/histogram: Histogram changes for Display 20+
Date: Wed, 25 Sep 2024 15:59:28 +0300	[thread overview]
Message-ID: <877caz3n4f.fsf@intel.com> (raw)
In-Reply-To: <IA0PR11MB730798D926F4304971D16283BA692@IA0PR11MB7307.namprd11.prod.outlook.com>

On Wed, 25 Sep 2024, "Murthy, Arun R" <arun.r.murthy@intel.com> wrote:
>> >> > +static __inline__ void set_bin_index_0(struct intel_display
>> >> > +*display, enum pipe pipe)
>> >>           ^^^^^^^^^^
>> >>
>> >> Why?
>> >>
>> > Sorry, didn't get your question. Is it why "enum pipe pipe"
>> 
>> No, why __inline__? What's the point?
>> 
>> (I tried to underline it with ^^^^^^^^^^ [1].)
>> 
>> You should basically never use inline in .c files, just let the compiler do its job.
>> And if you do need to use inline in headers, it should be "inline", not
>> "__inline__". See include/linux/compiler_types.h.
>> 
> The code within the inline functions is very much small and in order to execute
> that small code with functions involve register usage, hence thought of using
> inline.

It's just that the compiler usually knows better than us what to do, and
will automatically inline them, and much more, with a more clever
granularity.

And on the downside, e.g. gcc does not warn about unused static inlines
in .c files.

> Will remove inline!

Thanks,
Jani.


-- 
Jani Nikula, Intel

  reply	other threads:[~2024-09-25 12:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19 13:31 [PATCH 0/6] Display Global Histogram Arun R Murthy
2024-09-19 13:31 ` [PATCHv3 1/6] drm/i915/histogram: Add support for histogram Arun R Murthy
2024-09-25  5:32   ` Kandpal, Suraj
2024-09-25  6:00     ` Murthy, Arun R
2024-09-25  6:04     ` Kandpal, Suraj
2024-09-25 10:09       ` Murthy, Arun R
2024-09-19 13:31 ` [PATCHv3 2/6] drm/xe: Add histogram support to Xe builds Arun R Murthy
2024-09-25  5:33   ` Kandpal, Suraj
2024-09-19 13:31 ` [PATCHv3 3/6] drm/i915/histogram: histogram interrupt handling Arun R Murthy
2024-09-19 13:31 ` [PATCHv3 4/6] drm/i915/histogram: Add crtc properties for global histogram Arun R Murthy
2024-09-19 13:31 ` [PATCHv3 5/6] drm/i915/histogram: histogram delay counter doesnt reset Arun R Murthy
2024-09-25  5:37   ` Kandpal, Suraj
2024-09-19 13:31 ` [PATCHv3 6/6] drm/i915/histogram: Histogram changes for Display 20+ Arun R Murthy
2024-09-25  9:01   ` Jani Nikula
2024-09-25 10:21     ` Murthy, Arun R
2024-09-25 11:13       ` Jani Nikula
2024-09-25 12:13         ` Murthy, Arun R
2024-09-25 12:59           ` Jani Nikula [this message]
2024-09-19 13:48 ` ✓ CI.Patch_applied: success for Display Global Histogram Patchwork
2024-09-19 13:48 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-19 13:49 ` ✓ CI.KUnit: success " Patchwork
2024-09-19 14:07 ` ✓ CI.Build: " Patchwork
2024-09-19 14:09 ` ✗ CI.Hooks: failure " Patchwork
2024-09-19 14:11 ` ✗ CI.checksparse: warning " Patchwork
2024-09-19 14:40 ` ✗ CI.BAT: failure " Patchwork
2024-09-19 20:20 ` ✗ CI.FULL: " Patchwork
2024-09-20  5:43 ` ✗ Fi.CI.CHECKPATCH: warning for Display Global Histogram (rev3) Patchwork
2024-09-20  5:43 ` ✗ Fi.CI.SPARSE: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877caz3n4f.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.