Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Rodrigo Vivi
On Wed, Nov 01, 2017 at 07:08:52PM +, Manasi Navare wrote: > On Wed, Nov 01, 2017 at 11:44:58AM -0700, Rodrigo Vivi wrote: > > It is unlikely we are getting the -1 here. > > But if we propagate that pll_id -1 to the rest of the code > > we might have funny calculations on link_clock and who >

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Ville Syrjälä
On Wed, Nov 01, 2017 at 12:13:42PM -0700, Rodrigo Vivi wrote: > On Wed, Nov 01, 2017 at 06:56:55PM +, Ville Syrjälä wrote: > > On Wed, Nov 01, 2017 at 11:44:58AM -0700, Rodrigo Vivi wrote: > > > It is unlikely we are getting the -1 here. > > > But if we propagate that pll_id -1 to the rest of

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Rodrigo Vivi
On Wed, Nov 01, 2017 at 06:56:55PM +, Ville Syrjälä wrote: > On Wed, Nov 01, 2017 at 11:44:58AM -0700, Rodrigo Vivi wrote: > > It is unlikely we are getting the -1 here. > > But if we propagate that pll_id -1 to the rest of the code > > we might have funny calculations on link_clock and who >

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Manasi Navare
On Wed, Nov 01, 2017 at 11:44:58AM -0700, Rodrigo Vivi wrote: > It is unlikely we are getting the -1 here. > But if we propagate that pll_id -1 to the rest of the code > we might have funny calculations on link_clock and who > knows what registers we end up accessing. > > Better to protect the

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Ville Syrjälä
On Wed, Nov 01, 2017 at 11:44:58AM -0700, Rodrigo Vivi wrote: > It is unlikely we are getting the -1 here. > But if we propagate that pll_id -1 to the rest of the code > we might have funny calculations on link_clock and who > knows what registers we end up accessing. > > Better to protect the

[Intel-gfx] [PATCH] drm/i915: Don't try to use negative pll_id.

2017-11-01 Thread Rodrigo Vivi
It is unlikely we are getting the -1 here. But if we propagate that pll_id -1 to the rest of the code we might have funny calculations on link_clock and who knows what registers we end up accessing. Better to protect the code. Also better with errno number instead of generic -1. Cc: Manasi