~ubuntu-branches/ubuntu/precise/fglrx-installer/precise-updates

« back to all changes in this revision

Viewing changes to lib/modules/fglrx/build_mod/kcl_agp.c

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2013-12-18 17:50:31 UTC
  • mfrom: (1.1.29)
  • Revision ID: package-import@ubuntu.com-20131218175031-35cj2hx9xpmm8xot
Tags: 2:13.101-0ubuntu0.0.1
* New upstream release:
  - Add support for AMD A10, A8, A6, and A4 Series APUs.
  - Add GLX_EXT_buffer_age extension support.
  - Add Xserver 1.14 Support.
  - [371937] Fix black screen while entering Team
    Fortress 2  under cinnamon desktop environment.
  - [366812] Fix tearing for some OpenGL applications
    with VSYNC on or off.
  - [373575] Fix taskbar missing after UVD playback
    on Ubuntu 12.04.
  - [370955] Fix corruption in Team Fortress 2 when
    running Dustbowl map.
  - [377199] Fix the error for APL initialization
    failure.
  - [378086] Fix screen corruption when kill X on
    Ubuntu 13.04.
  - [374657] Fix some WebGL conformance test
    failures.
  - [377379] Fix the regression of performance drop
    with XBMC for UVD playback.
* debian/substvars:
  - Add support for X ABI up to 14 and xservers up to
    xserver-xorg-core-lts-saucy.
* debian/rules:
  - Sign the driver to remove the watermark.
* debian/dkms.conf.in, buildfix_kernel_3.12.patch:
  - Add support for Linux 3.12.
  - Add proper support for Linux 3.11 (LP: #1262238).

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
    }
273
273
}
274
274
 
275
 
/** \brief Get AGP caps
 
275
/** \brief Find AGP caps registers in PCI config space
276
276
 ** \param dev PCI device handle
277
 
 ** \param caps pointer to caps vector
278
 
 ** \return Zero on success, nonzero on fail
 
277
 ** \return Positive register index on success, negative errno on error
279
278
 */
280
 
int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int* caps)
 
279
int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
281
280
{
282
281
    u8 capndx;
283
282
    u32 cap_id;
284
283
 
285
 
    if (!caps)
286
 
    {
287
 
        return -EINVAL;
288
 
    }
289
 
 
290
284
    if (!dev)
291
285
    {
292
286
        return -ENODEV;
305
299
 
306
300
        if ((cap_id & 0xff) == 0x02)
307
301
        {
308
 
            pci_read_config_dword((struct pci_dev*)dev, capndx + 0, &(caps[0])); /* AGP CAPPTR */
309
 
            pci_read_config_dword((struct pci_dev*)dev, capndx + 4, &(caps[1])); /* AGP STATUS */
310
 
            pci_read_config_dword((struct pci_dev*)dev, capndx + 8, &(caps[2])); /* AGP COMMAND */
311
 
 
312
 
            return 0; /* success */
 
302
            return capndx;
313
303
        }
314
304
 
315
305
        capndx = (cap_id >> 8) & 0xff;
319
309
    return -ENODATA;
320
310
}
321
311
 
 
312
/** \brief Get AGP caps
 
313
 ** \param dev PCI device handle
 
314
 ** \param caps pointer to caps vector
 
315
 ** \return Zero on success, nonzero on fail
 
316
 */
 
317
int ATI_API_CALL KCL_AGP_ReadCapsRegisters(KCL_PCI_DevHandle dev, unsigned int* caps)
 
318
{
 
319
    int capndx;
 
320
 
 
321
    if (!caps)
 
322
    {
 
323
        return -EINVAL;
 
324
    }
 
325
 
 
326
    if (!dev)
 
327
    {
 
328
        return -ENODEV;
 
329
    }
 
330
 
 
331
    if ((capndx = KCL_AGP_FindCapsRegisters(dev)) < 0)
 
332
    {
 
333
        return capndx;
 
334
    }
 
335
    else
 
336
    {
 
337
        pci_read_config_dword((struct pci_dev*)dev, capndx + 0, &(caps[0])); /* AGP CAPPTR */
 
338
        pci_read_config_dword((struct pci_dev*)dev, capndx + 4, &(caps[1])); /* AGP STATUS */
 
339
        pci_read_config_dword((struct pci_dev*)dev, capndx + 8, &(caps[2])); /* AGP COMMAND */
 
340
 
 
341
        return 0; /* success */
 
342
    }
 
343
}
 
344
 
322
345
/** \brief Acquire AGP
323
346
 ** \param dev PCI device handle
324
347
 ** \return Zero on success, nonzero on fail
374
397
            AGP_FUNC(copy_info)(&kern);
375
398
        }
376
399
 
377
 
        device = kern.device;
 
400
        info->pcidev = device = kern.device;
378
401
 
379
402
        info->version.major = kern.version.major;
380
403
        info->version.minor = kern.version.minor;