[PATCH v7 3/4] drm/xe/hwmon: Update xe_hwmon_process_reg

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Apr 9 18:52:07 UTC 2024


On Tue, Apr 09, 2024 at 12:52:34PM -0500, Lucas De Marchi wrote:
> On Fri, Apr 05, 2024 at 06:31:26PM +0530, Karthik Poosa wrote:
> > Return u64 from xe_hwmon_process_reg, instead of a void return.
> > u64* input pointer not needed with this change.
> > 
> > With this caller can directly assign return value to a variable without
> > need of explicit initialization and pass by reference.
> > 
> > v2:
> > - Fix checkpatch warnings.
> > 
> > v3:
> > - Rebase
> > - Removed unncessary break statements.
> > 
> > Signed-off-by: Karthik Poosa <karthik.poosa at intel.com>
> > Suggested-by: Lucas De Marchi <lucas.demarchi at intel.com>
> > Cc: Badal Nilawar <badal.nilawar at intel.com>
> 
> Applied the other patches.  This one I'm putting on hold to think about.
> 
> I'm not sure the approach in that hwmon in general is good with the
> xe_hwmon_get_reg() + xe_hwmon_process_reg(). It seems it's even taking
> some pm refs when it doesn't need (to decide if attribute is visible).

I believe this approach is fine.
We do need to earlier get pm refs if we believe that there will be mmio
operations underneath. Better more then less in this case.

> 
> Lucas De Marchi


More information about the Intel-xe mailing list