similar files amd vs radeon

Deucher, Alexander Alexander.Deucher at amd.com
Tue Sep 8 20:26:42 PDT 2015


> -----Original Message-----
> From: Peter Senna Tschudin [mailto:peter.senna at gmail.com]
> Sent: Monday, September 07, 2015 11:09 AM
> To: David Airlie; Deucher, Alexander; Koenig, Christian; Zhou, Jammy; dri-
> devel at lists.freedesktop.org; linux-kernel at vger.kernel.org
> Subject: similar files amd vs radeon
> 
> I executed a clone detection tool* on drivers source code and I found
> that there are similar files between drivers/gpu/drm/amd/ and
> drivers/gpu/drm/radeon, but also inside each of theses folders.
> 
> Some examples:
> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c,drivers/gpu/drm/amd/amdgpu
> /dce_v10_0.c
> drivers/gpu/drm/amd/amdgpu/ci_dpm.c,drivers/gpu/drm/radeon/ci_dpm.c
> drivers/gpu/drm/radeon/kv_dpm.c,drivers/gpu/drm/amd/amdgpu/kv_dpm
> .c
> 
> I use meld for seeing the differences and similarities. More results
> from the tool at: http://pastebin.com/iX3fhifG (The number on the
> first field is the number of probable cloned lines of code).
> 
> Should these files be consolidated? And if so how?

No, they shouldn't be.  Amdgpu was forked from radeon to restructure the driver and support new asics.  However, due to the nature of the restructuring and our past experience with radeon, there's not much more we'd like to consolidate.  We did the initial prototyping and bring up for amdgpu on CI parts (ci and kv) which are already supported in radeon since we wanted to use an asic that was already well supported in radeon so we had a good working base to compare against as we brought up the new driver.  The CI support in amdgpu however can be conditionally compiled out to avoid duplication of support.  The dce files are for specific versions of the display hw block.  Each hardware version is similar, but there are enough version specific differences that I'd rather not further consolidate the code to avoid bug fixes in one version regressing features in another version.

Alex

> 
> Thank you,
> 
> Peter
> 
> * https://github.com/petersenna/ccfinderx-core
> 
> --
> Peter


More information about the dri-devel mailing list