• Rodrigo Siqueira's avatar
    drm/amd/display: Add control mechanism for FPU utilization · 2d8471dc
    Rodrigo Siqueira authored
    DC invokes DC_FPU_START/END in multiple parts of the code; this can
    create a situation where we invoke this FPU operation in a nested way or
    exit too early. For avoiding this situation, this commit adds a
    mechanism where dc_fpu_begin/end manages the access to
    kernel_fpu_begin/end.
    
    Change since V3:
    - Rebase
    
    Change since V2:
    - Christian: Do not use this_cpu_* between get/put_cpu_ptr().
    
    Change since V1:
    - Use a better variable names
    - Use get_cpu_ptr and put_cpu_ptr to better balance preemption enable
    and disable
    
    Cc: Harry Wentland <harry.wentland@amd.com>
    Cc: Anson Jacob <Anson.Jacob@amd.com>
    Cc: Christian König <christian.koenig@amd.com>
    Cc: Hersen Wu <hersenxs.wu@amd.com>
    Cc: Aric Cyr <aric.cyr@amd.com>
    Cc: Jun Lei <jun.lei@amd.com>
    Cc: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
    Cc: Qingqing Zhuo <qingqing.zhuo@amd.com>
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    2d8471dc
dc_fpu.c 3.86 KB