[PATCH 1/2] drm/ttm: remove unused placement flags

Emil Velikov emil.l.velikov at gmail.com
Fri Sep 9 13:54:54 UTC 2016


On 9 September 2016 at 12:24, Christian König <deathsimple at vodafone.de> wrote:
> Hi Hawking,
>
>> Removing the flag will make ttm_mem_type_from_place skip counting the
>> corresponding placement and thus have impact on mem region create and bo
>> movement.
>
> And that is exactly the reason why I want to remove the unused flags.
>
>> There is no guarantee that amdgpu would never introduce new memory domain
>> in future.
>
> Irrelevant, if any driver wants to use additional domains it should add them
> when they are used.
>
> BTW: Why would we want to add another TTM domain? I really don't see any
> need for that.
>
>> Then how about keep these flags?
>
> Actually we used to have automated scanners which complain about unused
> code. I'm wondering why they don't detected that earlier.
>
> Anyway any code which isn't used in a while should be removed.
>
Fwiw I second Christian here. If they are unused in open-source
drivers there's no reason to keep them.
If/as that changes the (newly introduced) user can add back the relevant code.

If closed-source driver(s) use them, then they can keep it as part of
their blob. Upstream kernel does not cater for closed-source drivers,
period.
I realise that's not the answer some are hoping for, so if you want to
question it take it up with Linus and co.

Regards,
Emil


More information about the amd-gfx mailing list