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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to