[PATCH xserver 1/2] modesetting: Don't reuse iterator in nested loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-05 03:58 PM, Daniel Stone wrote:
> drmmode_crtc_set_mode has a loop nested inside another loop, where both
> of them were using 'i' as the loop iterator. Rename it to avoid an
> infinite loop.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> Reported-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  hw/xfree86/drivers/modesetting/drmmode_display.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 0eacefba2..f5f9fa582 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -778,12 +778,13 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
>              drmmode_crtc_private_ptr other_drmmode_crtc = other_crtc->driver_private;
>              int lost_outputs = 0;
>              int remaining_outputs = 0;
> +	    int j;

Indentation looks wrong here.


With that and the bug pointed out by others fixed,

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>


Note that it still fails to actually light up for me with amdgpu DC
though, drmModeAtomicCommit returns -EINVAL. I'm afraid no bandwidth
right now (or indeed for a while) to help with looking into that, other
than maybe occasionally testing patches. Adding the amd-gfx list, as
this might be a DC issue.

OTOH it fails to light up with the radeon kernel driver as well,
drmModeSetCrtc returns -ENOENT.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux