<div dir="ltr">Hi,<div><br></div><div>While comparing radeon's radeon_afmt_init() to dce_vX_0_afmt_init() on the amdgpu's side, I saw that on the latter:</div><div>1- when kzalloc fails to allocate mem for all afmt, an ENOMEM is returned</div><div>2- all previously allocated afmt are freed</div><div><br></div><div>So on the amdgpu's side, it is an "all or none allocated" situation, while on the radeon's side, some afmt may be allocated and initialized.</div><div><br></div><div>Moreover, returning an ENOMEM prevents any other function calls inĀ <span style="font-size:13.3333px;line-height:normal">dce_vX_0_</span><span style="font-size:13.3333px;line-height:normal">sw_init() on the amdgpu's side, while it continues on the radeon's side.</span><br></div><div><span style="font-size:13.3333px;line-height:normal"><br></span></div><div><span style="font-size:13.3333px;line-height:normal">What is the expected behavior here? Should we rewind the memory allocation as it is done under amdgpu when we can't allocate memory for all afmt or is it OK to do as it is done on radeon? Should we stop any remaining steps in radeon_modeset_init() if it fails (thus, returning a ENOMEM from radeon_afmt_init())?</span></div><div><span style="font-size:13.3333px;line-height:normal"><br></span></div><div><span style="font-size:13.3333px;line-height:normal">The patch is already ready if needed, I could send it later from home if the amdgpu's behavior is the one that we are looking for.</span></div><div><span style="font-size:13.3333px;line-height:normal"><br></span></div><div><span style="font-size:13.3333px;line-height:normal">Cheers,</span></div><div><span style="font-size:13.3333px;line-height:normal">Alexandre Demers</span></div></div>