Re: [PATCH 7/9] drm/i915: intel_wait_for_register_fw to uncore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Daniele Ceraolo Spurio (2019-03-25 21:49:38)
> +static inline void intel_uncore_rmw_or_fw(struct intel_uncore *uncore,
> +                                         i915_reg_t reg, u32 or_val)
> +{
> +       intel_uncore_write_fw(uncore, reg,
> +                             intel_uncore_read_fw(uncore, reg) | or_val);
> +}

Considering how frequently this could be used (display code, I'm looking
at you), I'd make this out-of-line and do a full rmw.


intel_uncore_rmw(uncore, reg, u32 mask, u32 or)
{
	u32 val;

	val = intel_uncore_read(uncore, reg);
	val &= mask;
	val |= or;
	intel_uncore_write(uncore, reg, val);
}

Ok, now I see that you did the _fw variant. Yeah, that could probably
start off inline :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux