1. 19 May, 2020 3 commits
    • Ville Syrjälä's avatar
      drm/i915: Read out hrawclk on all gen3+ platforms · 488e0179
      Ville Syrjälä authored
      I've checked a bunch of gen3/4 machines and all seem to have
      consistent FSB frequency information in the CLKCFG register.
      So let's read out hrawclk on all gen3+ machines. Although
      apart from g4x/pnv aux/pps dividers we only really need this
      for for i965g/gm cs timestamp increment.
      
      The CLKCFG memory clock values seem less consistent but we
      don't care about those here.
      
      For posterity here's a list of CLKCFG vs. FSB dumps from
      a bunch of machines (only missing lpt for a full set):
      machine CLKCFG     FSB
      alv1    0x00001411 533
      alv2    0x00000420 400 (Chris)
      gdg1    0x20000022 800
      gdg2    0x20000022 800
      cst     0x00010043 666
      blb     0x00002034 1333
      pnv1    0x00000423 666
      pnv2    0x00000433 666
      965gm   0x00004342 800
      946gz   0x00000022 800
      965g    0x00000422 800
      g35     0x00000430 1066
              0x00000434 1333
      ctg1    0x00644056 1066
      ctg2    0x00644066 1066
      elk1    0x00012420 1066
              0x00012424 1333
              0x00012436 1600
              0x00012422 800
      elk2    0x00012040 1066
      
      For the mobile parts the chipset docs generally have these
      documented to some degree (alv being the exception).
      
      The two settings w/o any evidence are 0x5=400MHz on desktop
      and 0x7=1333MHz on mobile. Though the mobile 1333MHz case
      probably doesn't even exist since ctg is only documented
      to go up to 1066MHz.
      
      v2: Fix 400mhz readout for Chris's alv/celeron machine
          Do a clean mobile vs. dekstop split since that's really
          what seems to be going on
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-3-ville.syrjala@linux.intel.comAcked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      488e0179
    • Ville Syrjälä's avatar
      drm/i915: Document our lackluster FSB frequency readout · 42ab3305
      Ville Syrjälä authored
      Document the fact that we aren't reading out the actual FSB
      frequency but rather just the state of the FSB straps.
      Some BIOSen allow you to configure the two independently.
      So if someone sets the two up in an inconsistent manner
      we'll get the wrong answer here and thus will end up with
      incorrect aux/pps clock dividers. Alas, proper docs are no
      longer around so we can't do any better.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-2-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      42ab3305
    • Ville Syrjälä's avatar
      drm/i915: Fix 400 MHz FSB readout on elk · 6f62bda1
      Ville Syrjälä authored
      Looks like elk redefines some of the CLKCFG FSB values to
      make room for 400 MHz FSB. The setting overlaps with one of
      the 266MHz settings (which is even documented in the ctg docs,
      and cofirmed to be correct on my ctg). So we limit the special
      case to elk only.
      
      Though it might also be that we have some kind of desktop vs.
      mobile difference going on here as eg. both g35 and elk
      use 0x0 for the 266 MHz setting, vs. 0x6 used by ctg). The
      g35 doesn't let me select 400MHz for the FSB strap so can't
      confirm which way it would go here. But anyways as it seems
      only elk has the 400MHz option we shouldn't lose anything
      by limiting the special case to it alone.
      
      My earlier experiments on this appear to have been nonsense as
      the comment I added claims that FSB strap of 400MHz results in
      a value of 0x4, but I've now retested it and I definitely get a
      value of 0x6 instead. So let's remove that bogus comment.
      
      v2: s/_ELK/_ALT/ in the define in anticipation of a full
          mobile vs. desktop CLKCFG split
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-1-ville.syrjala@linux.intel.comAcked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      6f62bda1
  2. 18 May, 2020 4 commits
  3. 16 May, 2020 2 commits
  4. 15 May, 2020 14 commits
  5. 14 May, 2020 17 commits