[PATCH v4 1/5] fsl-diu-fb: fix issue with re-enabling DIU area descriptor

Detlev Zundel dzu at denx.de
Thu Jul 29 21:48:02 EST 2010


Hi Grant,

> On Fri, Jul 23, 2010 at 8:00 AM, Anatolij Gustschin <agust at denx.de> wrote:
>> On MPC5121e Rev 2.0 re-configuring the DIU area descriptor
>> by writing new descriptor address doesn't always work.
>> As a result, DIU continues to display using old area descriptor
>> even if the new one has been written to the descriptor register of
>> the plane.
>>
>> Add the code from Freescale MPC5121EADS BSP for writing descriptor
>> addresses properly. This fixes the problem for Rev 2.0 silicon.
>>
>> Signed-off-by: Anatolij Gustschin <agust at denx.de>
>> ---
>> v4:
>>  - use workaround code as suggested by FSL technical support.
>>
>> v3:
>>  - no changes since v1
>>
>>  drivers/video/fsl-diu-fb.c |   38 +++++++++++++++++++++++---------------
>>  1 files changed, 23 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
>> index 27455ce..9b8c991 100644
>> --- a/drivers/video/fsl-diu-fb.c
>> +++ b/drivers/video/fsl-diu-fb.c
>> @@ -317,6 +317,17 @@ static void fsl_diu_free(void *virt, size_t size)
>>                free_pages_exact(virt, size);
>>  }
>>
>> +/*
>> + * Workaround for failed writing desc register of planes.
>> + * Needed with MPC5121 DIU rev 2.0 silicon.
>> + */
>> +void wr_reg_wa(u32 *reg, u32 val)
>> +{
>> +       do {
>> +               out_be32(reg, val);
>> +       } while (in_be32(reg) != val);
>> +}
>
> I'll apply this one, but it looks like a potential problem.  What
> happens if the write never succeeds?  The kernel then gets stuck in a
> forever busy loop.  You should look at reworking it.

We would surely like to do this "the correct way(tm)".  Unfortunately
this commit reflects what we have been told by Freescale support and it
fixes a real observed problem.  We fail to find a better solution
without any insight into the internal workings of the functional block.

Cheers
  Detlev

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de



More information about the Linuxppc-dev mailing list