Loading drivers/gpu/msm/adreno.c +1 −2 Original line number Diff line number Diff line Loading @@ -1333,8 +1333,7 @@ static int adreno_init(struct kgsl_device *device) } if (nopreempt == false && ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION)) { if (nopreempt == false) { int r = 0; if (gpudev->preemption_init) Loading drivers/gpu/msm/adreno.h +15 −2 Original line number Diff line number Diff line Loading @@ -528,6 +528,7 @@ enum adreno_device_flags { ADRENO_DEVICE_ISDB_ENABLED = 12, ADRENO_DEVICE_CACHE_FLUSH_TS_SUSPENDED = 13, ADRENO_DEVICE_HARD_RESET = 14, ADRENO_DEVICE_PREEMPTION_EXECUTION = 15, }; /** Loading Loading @@ -1550,11 +1551,23 @@ static inline void adreno_set_preempt_state(struct adreno_device *adreno_dev, smp_wmb(); } static inline bool adreno_is_preemption_enabled( static inline bool adreno_is_preemption_execution_enabled( struct adreno_device *adreno_dev) { return test_bit(ADRENO_DEVICE_PREEMPTION_EXECUTION, &adreno_dev->priv); } static inline bool adreno_is_preemption_setup_enabled( struct adreno_device *adreno_dev) { return test_bit(ADRENO_DEVICE_PREEMPTION, &adreno_dev->priv); } static inline bool adreno_is_preemption_enabled( struct adreno_device *adreno_dev) { return 0; } /** * adreno_ctx_get_rb() - Return the ringbuffer that a context should * use based on priority Loading @@ -1578,7 +1591,7 @@ static inline struct adreno_ringbuffer *adreno_ctx_get_rb( * ringbuffer */ if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return &(adreno_dev->ringbuffers[0]); /* Loading drivers/gpu/msm/adreno_a6xx.c +3 −3 Original line number Diff line number Diff line Loading @@ -567,7 +567,7 @@ static void a6xx_start(struct adreno_device *adreno_dev) kgsl_regrmw(device, A6XX_PC_DBG_ECO_CNTL, 0, (1 << 8)); /* Enable the GMEM save/restore feature for preemption */ if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_setup_enabled(adreno_dev)) kgsl_regwrite(device, A6XX_RB_CONTEXT_SWITCH_GMEM_SAVE_RESTORE, 0x1); Loading Loading @@ -773,7 +773,7 @@ static int a6xx_post_start(struct adreno_device *adreno_dev) struct adreno_ringbuffer *rb = adreno_dev->cur_rb; struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return 0; cmds = adreno_ringbuffer_allocspace(rb, 42); Loading Loading @@ -2295,7 +2295,7 @@ static void a6xx_cp_callback(struct adreno_device *adreno_dev, int bit) { struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_execution_enabled(adreno_dev)) a6xx_preemption_trigger(adreno_dev); adreno_dispatcher_schedule(device); Loading drivers/gpu/msm/adreno_a6xx_preempt.c +4 −4 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ void a6xx_preemption_schedule(struct adreno_device *adreno_dev) { struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return; mutex_lock(&device->mutex); Loading Loading @@ -453,7 +453,7 @@ void a6xx_preemption_start(struct adreno_device *adreno_dev) struct adreno_ringbuffer *rb; unsigned int i; if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return; /* Force the state to be clear */ Loading Loading @@ -631,7 +631,7 @@ void a6xx_preemption_context_destroy(struct kgsl_context *context) struct kgsl_device *device = context->device; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_setup_enabled(adreno_dev)) return; gpumem_free_entry(context->user_ctxt_record); Loading @@ -642,7 +642,7 @@ int a6xx_preemption_context_init(struct kgsl_context *context) struct kgsl_device *device = context->device; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_setup_enabled(adreno_dev)) return 0; context->user_ctxt_record = gpumem_alloc_entry(context->dev_priv, Loading drivers/gpu/msm/adreno_dispatch.c +1 −1 Original line number Diff line number Diff line Loading @@ -2139,7 +2139,7 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev) * Deleting uninitialized timer will block for ever on kernel debug * disable build. Hence skip del timer if it is not initialized. */ if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_execution_enabled(adreno_dev)) del_timer_sync(&adreno_dev->preempt.timer); mutex_lock(&device->mutex); Loading Loading
drivers/gpu/msm/adreno.c +1 −2 Original line number Diff line number Diff line Loading @@ -1333,8 +1333,7 @@ static int adreno_init(struct kgsl_device *device) } if (nopreempt == false && ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION)) { if (nopreempt == false) { int r = 0; if (gpudev->preemption_init) Loading
drivers/gpu/msm/adreno.h +15 −2 Original line number Diff line number Diff line Loading @@ -528,6 +528,7 @@ enum adreno_device_flags { ADRENO_DEVICE_ISDB_ENABLED = 12, ADRENO_DEVICE_CACHE_FLUSH_TS_SUSPENDED = 13, ADRENO_DEVICE_HARD_RESET = 14, ADRENO_DEVICE_PREEMPTION_EXECUTION = 15, }; /** Loading Loading @@ -1550,11 +1551,23 @@ static inline void adreno_set_preempt_state(struct adreno_device *adreno_dev, smp_wmb(); } static inline bool adreno_is_preemption_enabled( static inline bool adreno_is_preemption_execution_enabled( struct adreno_device *adreno_dev) { return test_bit(ADRENO_DEVICE_PREEMPTION_EXECUTION, &adreno_dev->priv); } static inline bool adreno_is_preemption_setup_enabled( struct adreno_device *adreno_dev) { return test_bit(ADRENO_DEVICE_PREEMPTION, &adreno_dev->priv); } static inline bool adreno_is_preemption_enabled( struct adreno_device *adreno_dev) { return 0; } /** * adreno_ctx_get_rb() - Return the ringbuffer that a context should * use based on priority Loading @@ -1578,7 +1591,7 @@ static inline struct adreno_ringbuffer *adreno_ctx_get_rb( * ringbuffer */ if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return &(adreno_dev->ringbuffers[0]); /* Loading
drivers/gpu/msm/adreno_a6xx.c +3 −3 Original line number Diff line number Diff line Loading @@ -567,7 +567,7 @@ static void a6xx_start(struct adreno_device *adreno_dev) kgsl_regrmw(device, A6XX_PC_DBG_ECO_CNTL, 0, (1 << 8)); /* Enable the GMEM save/restore feature for preemption */ if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_setup_enabled(adreno_dev)) kgsl_regwrite(device, A6XX_RB_CONTEXT_SWITCH_GMEM_SAVE_RESTORE, 0x1); Loading Loading @@ -773,7 +773,7 @@ static int a6xx_post_start(struct adreno_device *adreno_dev) struct adreno_ringbuffer *rb = adreno_dev->cur_rb; struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return 0; cmds = adreno_ringbuffer_allocspace(rb, 42); Loading Loading @@ -2295,7 +2295,7 @@ static void a6xx_cp_callback(struct adreno_device *adreno_dev, int bit) { struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_execution_enabled(adreno_dev)) a6xx_preemption_trigger(adreno_dev); adreno_dispatcher_schedule(device); Loading
drivers/gpu/msm/adreno_a6xx_preempt.c +4 −4 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ void a6xx_preemption_schedule(struct adreno_device *adreno_dev) { struct kgsl_device *device = KGSL_DEVICE(adreno_dev); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return; mutex_lock(&device->mutex); Loading Loading @@ -453,7 +453,7 @@ void a6xx_preemption_start(struct adreno_device *adreno_dev) struct adreno_ringbuffer *rb; unsigned int i; if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_execution_enabled(adreno_dev)) return; /* Force the state to be clear */ Loading Loading @@ -631,7 +631,7 @@ void a6xx_preemption_context_destroy(struct kgsl_context *context) struct kgsl_device *device = context->device; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_setup_enabled(adreno_dev)) return; gpumem_free_entry(context->user_ctxt_record); Loading @@ -642,7 +642,7 @@ int a6xx_preemption_context_init(struct kgsl_context *context) struct kgsl_device *device = context->device; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (!adreno_is_preemption_enabled(adreno_dev)) if (!adreno_is_preemption_setup_enabled(adreno_dev)) return 0; context->user_ctxt_record = gpumem_alloc_entry(context->dev_priv, Loading
drivers/gpu/msm/adreno_dispatch.c +1 −1 Original line number Diff line number Diff line Loading @@ -2139,7 +2139,7 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev) * Deleting uninitialized timer will block for ever on kernel debug * disable build. Hence skip del timer if it is not initialized. */ if (adreno_is_preemption_enabled(adreno_dev)) if (adreno_is_preemption_execution_enabled(adreno_dev)) del_timer_sync(&adreno_dev->preempt.timer); mutex_lock(&device->mutex); Loading