On Thu, Aug 1, 2013 at 1:54 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote: > 2013/7/31 Alex Deucher <alexdeucher at gmail.com>: >> On Wed, Jul 31, 2013 at 11:50 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote: >>> >>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com> >>> --- >>> Dave/Alex: please decide who picks this patch :) >> >> I think it might be easier to just assume 6 afmt blocks on all DCE4+ >> hardware (DCE6 too). It's makes the logic simpler in the driver. The >> afmt block is tied to the dig encoder so the correct one will always >> get selected even if a particular asic has more allocated than it has >> physically. > > I'm not sure about idea of allocating memory for parts of hardware > that don't exist (read: wasting some memory). It could be a nice > solution to allocate AFMT blocks depending on the amount of DIG > encoders. Unfortunately, I'm afraid we don't have anything like > "num_dig", do we? We assign "dig->dig_encoder" value using > radeon_atom_pick_dig_encoder, but it just check for encoder/link/crtc. > > Any other idea? Or should we just waste some memory? Is this worth it
It seems simpler to me, but it's not that big a deal either way. > to avoid this simple > if (ASIC_IS_DCE64(rdev)) > num_afmt = 2; Need to double check which PHYs oland actually has. I think it's just the first two. > else if (ASIC_IS_DCE61(rdev)) > num_afmt = 4; Trinity supports 6 dig encoders. > else if (ASIC_IS_DCE6(rdev)) > num_afmt = 6; > else if (ASIC_IS_DCE5(rdev)) > num_afmt = 6; > else if (ASIC_IS_DCE41(rdev)) > num_afmt = 2; > else /* DCE4 */ > num_afmt = 6; > ? > > > -- > Rafa?