<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, 9 Feb 2016 at 22:38 Michel Dänzer <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10.02.2016 10:11, Alexandre Demers wrote:<br>
> Signed-off-by: Alexandre Demers <<a href="mailto:alexandre.f.demers@gmail.com" target="_blank">alexandre.f.demers@gmail.com</a>><br>
> ---<br>
> src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 5 +++--<br>
> 1 file changed, 3 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c<br>
> index 49c310c..aab81f9 100644<br>
> --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c<br>
> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c<br>
> @@ -405,8 +405,9 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)<br>
> radeon_get_drm_value(ws->fd, RADEON_INFO_NUM_TILE_PIPES, NULL,<br>
> &ws->info.num_tile_pipes);<br>
><br>
> - /* The kernel returns 12 for some cards for an unknown reason.<br>
> - * I thought this was supposed to be a power of two.<br>
> + /* Tahiti have a max_tile_pipes of 12 exceptionally. However, we<br>
> + * work with power of two, so let's set it to the nearest power of<br>
> + * two value.<br>
> */<br>
<br>
Not sure that's better I'm afraid. It doesn't look like 12 is actually a<br>
possible hardware configuration, it might simply be a kernel driver bug.<br>
<br>
<br>
--<br>
Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br></blockquote><div><br></div><div>On the other hand, the current comment isn't true either (and probably farther from the truth): it's not true that we don't know why the kernel returns 12 or which cards/gpus are affected (only tahiti is concerned). If someone has to investigate this portion of code later in time, it will be even harder to understand why the comment was added: it gives no clue about the reported bug it fixes nor any information we have about the specific GPU identified and the fact that this value is known to be the one set in the kernel driver.</div><div><br></div><div>While it could be true that this is a driver bug, I don't have any way to verify it. Also, according to what is available under ci_gpu_init() @ si.c#n3254 (where max_tile_pipes is defined), the value "12" was already flagged as problematic (there is a comment under tile_config for the default case). This comment was inserted by Alex Deucher himself in the initial commit (0ce635d67f8c65f9f804abd77b63a65c08107e79). And finally, if I understand correctly what Alex Deucher summed up under the thread "[PATCH] winsys/radeon: fix a wrong NUM_TILE_PIPES value from the kernel", he doesn't remember clearly where and why the value was defined as 12, most probably a hardware value, but it needed to be mapped to 8 for software usage.</div></div></div>