Loading drivers/gpu/msm/adreno.c +1 −1 Original line number Diff line number Diff line Loading @@ -2213,7 +2213,7 @@ bool adreno_hw_isidle(struct adreno_device *adreno_dev) adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS, ®_rbbm_status); if (reg_rbbm_status & ~0x80000001) if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK) return false; /* Don't consider ourselves idle if there is an IRQ pending */ Loading drivers/gpu/msm/adreno.h +2 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ #define DEVICE_3D_NAME "kgsl-3d" #define DEVICE_3D0_NAME "kgsl-3d0" #define ADRENO_RBBM_STATUS_BUSY_MASK ~0x80000001 #define ADRENO_PRIORITY_MAX_RB_LEVELS 4 /* ADRENO_DEVICE - Given a kgsl_device return the adreno device struct */ Loading drivers/gpu/msm/adreno_dispatch.c +7 −11 Original line number Diff line number Diff line Loading @@ -170,24 +170,20 @@ static void fault_detect_read(struct kgsl_device *device) static inline bool _isidle(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); unsigned int ts, i; unsigned int i; unsigned int reg_rbbm_status; if (!kgsl_state_is_awake(device)) goto ret; /* If GPU HW status is not idle then return false */ if (!adreno_hw_isidle(adreno_dev)) return false; adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS, ®_rbbm_status); /* * only compare the current RB timestamp because the device has gone * idle and therefore only the current RB ts can be equal, the other * RB's may not be scheduled by dispatcher yet * Check if gpu is busy by checking bits in RBBM_STATUS register * which indicate gpu activity */ if (adreno_rb_readtimestamp(device, adreno_dev->cur_rb, KGSL_TIMESTAMP_RETIRED, &ts)) return false; if (ts != adreno_dev->cur_rb->timestamp) if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK) return false; ret: for (i = 0; i < adreno_ft_regs_num; i++) Loading Loading
drivers/gpu/msm/adreno.c +1 −1 Original line number Diff line number Diff line Loading @@ -2213,7 +2213,7 @@ bool adreno_hw_isidle(struct adreno_device *adreno_dev) adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS, ®_rbbm_status); if (reg_rbbm_status & ~0x80000001) if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK) return false; /* Don't consider ourselves idle if there is an IRQ pending */ Loading
drivers/gpu/msm/adreno.h +2 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ #define DEVICE_3D_NAME "kgsl-3d" #define DEVICE_3D0_NAME "kgsl-3d0" #define ADRENO_RBBM_STATUS_BUSY_MASK ~0x80000001 #define ADRENO_PRIORITY_MAX_RB_LEVELS 4 /* ADRENO_DEVICE - Given a kgsl_device return the adreno device struct */ Loading
drivers/gpu/msm/adreno_dispatch.c +7 −11 Original line number Diff line number Diff line Loading @@ -170,24 +170,20 @@ static void fault_detect_read(struct kgsl_device *device) static inline bool _isidle(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); unsigned int ts, i; unsigned int i; unsigned int reg_rbbm_status; if (!kgsl_state_is_awake(device)) goto ret; /* If GPU HW status is not idle then return false */ if (!adreno_hw_isidle(adreno_dev)) return false; adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS, ®_rbbm_status); /* * only compare the current RB timestamp because the device has gone * idle and therefore only the current RB ts can be equal, the other * RB's may not be scheduled by dispatcher yet * Check if gpu is busy by checking bits in RBBM_STATUS register * which indicate gpu activity */ if (adreno_rb_readtimestamp(device, adreno_dev->cur_rb, KGSL_TIMESTAMP_RETIRED, &ts)) return false; if (ts != adreno_dev->cur_rb->timestamp) if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK) return false; ret: for (i = 0; i < adreno_ft_regs_num; i++) Loading