• Ville Syrjälä's avatar
    drm/i915: Make cursor plane registers unlocked · 0225a909
    Ville Syrjälä authored
    Drop the locks around cursor plane register writes. The
    lock isn't needed since each plane's register are neatly
    contained on their own cachelines.
    
    The locking did have a secondary effect of disabling
    interrupts around the cursor registers writes though.
    If we drop that then we open outselves up for sceduling
    delays and whatnot while on the middle of the register
    writes. That increases the chance of not all the register
    writes land during the same frame. For normal atomic
    commits this is not a concern as the vblank evade mechanism
    anyway disables interrupts around the update, but the legacy
    cursor codepath does not. Technically we should do a vblank
    evade there as well, but so far no one has bothered to hook
    that up. So in the meantime let's put an explicit local irq
    disable/enable around the legacy cursor update to keep the
    race window minimal.
    
    v2: local_irq_{disable,enable}() for legacy cursor ioctl
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220211092604.393-1-ville.syrjala@linux.intel.comReviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
    0225a909
intel_cursor.c 22.7 KB