On 2018å¹´05æ??09æ?¥ 17:50, Daniel Vetter wrote: > On Wed, May 09, 2018 at 10:34:51AM +0200, Lucas Stach wrote: >> All of those changes are including a Change-Id that has no bearing in >> upstream patches and are missing a proper commit description explaining >> why a specific change is done. > Imo the Change-Id: is ok if it makes people happy wrt internal tracking. > Linus might blow up, but there's lots of random nonsense that Linus blows > up on, so whatever. Yeah, Change-Id is just used internal, When upstreaming, it is removed. Alex, right? I'm not clear how you handle that when you upstream our internal patches. > > Lack of real commit message that explains stuff is the real thing here I'd > say. Agree, lacking commit message is really bad, that could be because this is a big feature, I was busy with implementing before. If Christian agree with my this idea, I will update more commit for every patch when sending again. Thanks, David Zhou > -Daniel > >> Regards, >> Lucas >> >> Am Mittwoch, den 09.05.2018, 14:45 +0800 schrieb Chunming Zhou: >>> Change-Id: Ie81985282fab1e564fc2948109fae2173613b465 >>>> Signed-off-by: Chunming Zhou <david1.zhou at amd.com> >>> --- >>> Â drivers/gpu/drm/ttm/ttm_bo.c | 35 ++++++++++++++++++++++++----------- >>> Â 1 file changed, 24 insertions(+), 11 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c >>> index 98e06f8bf23b..15506682a0be 100644 >>> --- a/drivers/gpu/drm/ttm/ttm_bo.c >>> +++ b/drivers/gpu/drm/ttm/ttm_bo.c >>> @@ -704,22 +704,20 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo, >>>> Â return ret; >>> Â } >>> >>> -static int ttm_mem_evict_first(struct ttm_bo_device *bdev, >>>> - Â Â Â Â Â Â Â uint32_t mem_type, >>>> - Â Â Â Â Â Â Â const struct ttm_place *place, >>>> - Â Â Â Â Â Â Â struct ttm_operation_ctx *ctx) >>> +static struct ttm_buffer_object * >>> +ttm_mem_get_evictable_bo(struct ttm_bo_device *bdev, >>>> + Â uint32_t mem_type, >>>> + Â const struct ttm_place *place, >>>> + Â struct ttm_operation_ctx *ctx, >>>> + Â bool *locked) >>> Â { >>>> - struct ttm_bo_global *glob = bdev->glob; >>>> - struct ttm_mem_type_manager *man = &bdev->man[mem_type]; >>>> Â struct ttm_buffer_object *bo = NULL; >>>> - bool locked = false; >>>> - unsigned i; >>>> - int ret; >>>> + struct ttm_mem_type_manager *man = &bdev->man[mem_type]; >>>> + int i; >>> >>>> - spin_lock(&glob->lru_lock); >>>> Â for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) { >>>> Â list_for_each_entry(bo, &man->lru[i], lru) { >>>> - if (!ttm_bo_evict_swapout_allowable(bo, ctx, &locked)) >>>> + if (!ttm_bo_evict_swapout_allowable(bo, ctx, locked)) >>>> Â continue; >>> >>>> Â if (place && !bdev->driver->eviction_valuable(bo, >>> @@ -738,6 +736,21 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev, >>>> Â bo = NULL; >>>> Â } >>> >>>> + return bo; >>> +} >>> + >>> +static int ttm_mem_evict_first(struct ttm_bo_device *bdev, >>>> + Â Â Â Â Â Â Â uint32_t mem_type, >>>> + Â Â Â Â Â Â Â const struct ttm_place *place, >>>> + Â Â Â Â Â Â Â struct ttm_operation_ctx *ctx) >>> +{ >>>> + struct ttm_bo_global *glob = bdev->glob; >>>> + struct ttm_buffer_object *bo = NULL; >>>> + bool locked = false; >>>> + int ret; >>> + >>>> + spin_lock(&glob->lru_lock); >>>> + bo = ttm_mem_get_evictable_bo(bdev, mem_type, place, ctx, &locked); >>>> Â if (!bo) { >>>> Â spin_unlock(&glob->lru_lock); >>>> Â return -EBUSY; >> _______________________________________________ >> dri-devel mailing list >> dri-devel at lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel