alpine 3.6
obsolete weakness #97


Weakness Breakdown


An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:



The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

 	  Bool restoreFonts) {
  I740Ptr pI740;
  vgaHWPtr hwp;
  unsigned char temp;
  unsigned int  itemp;

  pI740 = I740PTR(pScrn);
  hwp = VGAHWPTR(pScrn);

  vgaHWProtect(pScrn, TRUE);
#if 0
  temp=hwp->readCrtc(hwp, VERT_SYNC_END);
  hwp->writeCrtc(hwp, VERT_SYNC_END, temp&0x7F);

  temp = pI740->readControl(pI740, MRX, ACQ_CNTL_2); 
  if ((temp & FRAME_CAP_MODE) == SINGLE_CAP_MODE) {
    temp=pI740->readControl(pI740, MRX, COL_KEY_CNTL_1);
    temp |= BLANK_DISP_OVERLAY; /* Disable the overlay */
    pI740->writeControl(pI740, MRX, COL_KEY_CNTL_1, temp);
  } else {
    temp &= ~FRAME_CAP_MODE;
    pI740->writeControl(pI740, MRX, ACQ_CNTL_2, temp);

  /* Turn off DRAM Refresh */
  pI740->writeControl(pI740, XRX, DRAM_EXT_CNTL, DRAM_REFRESH_DISABLE);

  usleep(1000); /* Wait 1 ms */

  /* Write the M, N and P values */
  pI740->writeControl(pI740, XRX, VCLK2_VCO_M, i740Reg->VideoClk2_M);
  pI740->writeControl(pI740, XRX, VCLK2_VCO_N, i740Reg->VideoClk2_N);
  pI740->writeControl(pI740, XRX, VCLK2_VCO_MN_MSBS, i740Reg->VideoClk2_MN_MSBs);
  pI740->writeControl(pI740, XRX, VCLK2_VCO_DIV_SEL, i740Reg->VideoClk2_DivisorSel);

   * Turn on 8 bit dac mode, if requested.  This is needed to make
   * sure that vgaHWRestore writes the values into the DAC properly.
   * The problem occurs if 8 bit dac mode is requested and the HW is
   * in 6 bit dac mode.  If this happens, all the values are
   * automatically shifted left twice by the HW and incorrect colors
   * will be displayed on the screen.  The only time this can happen
   * is at server startup time and when switching back from a VT.
  temp=pI740->readControl(pI740, XRX, PIXPIPE_CONFIG_0);
  temp &= 0x7F; /* Save all but the 8 bit dac mode bit */
  temp |= (i740Reg->PixelPipeCfg0 & DAC_8_BIT);
  pI740->writeControl(pI740, XRX, PIXPIPE_CONFIG_0, temp); 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.