Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-20 Thread Emil Velikov
On 18 February 2017 at 22:22, Benjamin Herrenschmidt wrote: > On Sat, 2017-02-18 at 15:43 +, Emil Velikov wrote: >> >> Out of curiosity - can you try testing with and w/o the ddr_test_2500 >> bug fix(?). >> Would be interesting to see if any of the omitted code [in

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-18 Thread Benjamin Herrenschmidt
On Sat, 2017-02-18 at 15:43 +, Emil Velikov wrote: > > Out of curiosity - can you try testing with and w/o the ddr_test_2500 > bug fix(?). > Would be interesting to see if any of the omitted code [in > ast_dram_init_2500] has noticeable effect. Afaik, the original ddr_test_2500 from aspeed

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-18 Thread Emil Velikov
On 18 February 2017 at 03:41, Benjamin Herrenschmidt wrote: > On Fri, 2017-02-17 at 21:27 +, Emil Velikov wrote: >> Hi Ben, > > .../... > >> Not sure why you opted for splitting each suggestion in separate >> email, but it seems to have lead to a [serious] bugfix to

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-18 Thread Emil Velikov
On 17 February 2017 at 21:36, Benjamin Herrenschmidt wrote: > On Fri, 2017-02-17 at 21:27 +, Emil Velikov wrote: >> > Heh ok. I don't want to change that POST code too much as I'm not >> > equipped to test it, but I'll have a look later today. >> > >> >> Not sure why

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-17 Thread Benjamin Herrenschmidt
On Fri, 2017-02-17 at 21:27 +, Emil Velikov wrote: > Hi Ben, .../... > Not sure why you opted for splitting each suggestion in separate > email, but it seems to have lead to a [serious] bugfix to go > unnoticed. Many thanks for your reviews. I've put a tentative new series there

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-17 Thread Benjamin Herrenschmidt
On Fri, 2017-02-17 at 21:27 +, Emil Velikov wrote: > > Heh ok. I don't want to change that POST code too much as I'm not > > equipped to test it, but I'll have a look later today. > > > > Not sure why you opted for splitting each suggestion in separate > email, but it seems to have lead to a

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-17 Thread Emil Velikov
Hi Ben, On 16 February 2017 at 21:09, Benjamin Herrenschmidt wrote: > On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: >> On 16 February 2017 at 09:09, Benjamin Herrenschmidt >> wrote: >> > From: "Y.C. Chen" >> >

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: > > +static bool ast_dram_init_2500(struct ast_private *ast) > > +{ > > +   u32 data; > > +   u32 max_tries = 5; > > + > > +   do { > > +   if (max_tries-- == 0) > > +   return false; > > +   

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: > "Water is wet" type of comment. Worth mentioning why it's so large - > mentioned in the documentation, experimental result, other ? > Same suggestion goes for the other mdelay(100) instances. Ah I removed most of those useless comments, I

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: > I realise that there's likely no documentation, yet repeating the > same > magic numbers multiple times is a bit meh. This is all Aspeed original code. I merely fixed the coding style ;-) The other POST functions for the other chip gens

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: > The above seems like a _lot_ of unrelated rework. Keep the > refactoring > separate ? > New code seems to assume that only(?) -1 is returned on error, yet we > do < 0. > This will come to bite you/others as the tests are extended/reworked.

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 17:33 +, Emil Velikov wrote: > On 16 February 2017 at 09:09, Benjamin Herrenschmidt > wrote: > > From: "Y.C. Chen" > > > > Add detection and POST code for AST2500 generation chip, > > code originally from Aspeed and

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Emil Velikov
On 16 February 2017 at 09:09, Benjamin Herrenschmidt wrote: > From: "Y.C. Chen" > > Add detection and POST code for AST2500 generation chip, > code originally from Aspeed and slightly reworked for > coding style mostly by Ben. > > Signed-off-by:

Re: [PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
On Thu, 2017-02-16 at 20:09 +1100, Benjamin Herrenschmidt wrote: > From: "Y.C. Chen" > > Add detection and POST code for AST2500 generation chip, > code originally from Aspeed and slightly reworked for > coding style mostly by Ben. I just noticed there's still a bunch of

[PATCH 2/2] drm/ast: Support AST2500

2017-02-16 Thread Benjamin Herrenschmidt
From: "Y.C. Chen" Add detection and POST code for AST2500 generation chip, code originally from Aspeed and slightly reworked for coding style mostly by Ben. Signed-off-by: Y.C. Chen Signed-off-by: Benjamin Herrenschmidt