Subversion Repositories Kolibri OS

Rev

Rev 3031 | Rev 3192 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3031 Rev 3120
Line 31... Line 31...
31
#include 
31
#include 
32
#include 
32
#include 
33
#include "radeon_reg.h"
33
#include "radeon_reg.h"
34
#include "radeon.h"
34
#include "radeon.h"
35
#include "atom.h"
35
#include "atom.h"
-
 
36
 
-
 
37
#include "bitmap.h"
36
#include "display.h"
38
#include "display.h"
Line -... Line 39...
-
 
39
 
37
 
40
 
Line 38... Line 41...
38
#include 
41
#include 
39
 
42
 
Line 60... Line 63...
60
 
63
 
Line 61... Line 64...
61
int irq_override = 0;
64
int irq_override = 0;
-
 
65
 
-
 
66
 
Line 62... Line 67...
62
 
67
extern display_t *rdisplay;
63
 
68
struct drm_device *main_drm_device;
64
extern display_t *rdisplay;
69
 
Line 1240... Line 1245...
1240
 
1245
 
1241
    ret = radeon_driver_load_kms(dev, ent->driver_data );
1246
    ret = radeon_driver_load_kms(dev, ent->driver_data );
1242
    if (ret)
1247
    if (ret)
Line -... Line 1248...
-
 
1248
        goto err_g4;
-
 
1249
 
1243
        goto err_g4;
1250
    main_drm_device = dev;
1244
 
1251
 
1245
    if( radeon_modeset )
1252
    if( radeon_modeset )
1246
        init_display_kms(dev->dev_private, &usermode);
1253
        init_display_kms(dev->dev_private, &usermode);
Line 1315... Line 1322...
1315
static struct pci_device_id pciidlist[] = {
1322
static struct pci_device_id pciidlist[] = {
1316
    radeon_PCI_IDS
1323
    radeon_PCI_IDS
1317
};
1324
};
Line -... Line 1325...
-
 
1325
 
-
 
1326
 
-
 
1327
#define CURRENT_API     0x0200      /*      2.00     */
1318
 
1328
#define COMPATIBLE_API  0x0100      /*      1.00     */
Line 1319... Line 1329...
1319
 
1329
 
1320
#define API_VERSION     0x01000100
1330
#define API_VERSION     (COMPATIBLE_API << 16) | CURRENT_API
1321
 
1331
 
-
 
1332
#define SRV_GETVERSION      0
-
 
1333
#define SRV_ENUM_MODES      1
-
 
1334
#define SRV_SET_MODE        2
-
 
1335
#define SRV_GET_CAPS            3
-
 
1336
 
-
 
1337
#define SRV_CREATE_SURFACE      10
-
 
1338
#define SRV_DESTROY_SURFACE     11
-
 
1339
#define SRV_LOCK_SURFACE        12
-
 
1340
#define SRV_UNLOCK_SURFACE      13
-
 
1341
#define SRV_RESIZE_SURFACE      14
Line 1322... Line -...
1322
#define SRV_GETVERSION      0
-
 
1323
#define SRV_ENUM_MODES      1
-
 
1324
#define SRV_SET_MODE        2
-
 
Line 1325... Line 1342...
1325
 
1342
#define SRV_BLIT_BITMAP         15
1326
#define SRV_CREATE_VIDEO    9
1343
#define SRV_BLIT_TEXTURE        16
Line 1370... Line 1387...
1370
            check_input(sizeof(videomode_t));
1387
            check_input(sizeof(videomode_t));
1371
            if( radeon_modeset )
1388
            if( radeon_modeset )
1372
                retval = set_user_mode((videomode_t*)inp);
1389
                retval = set_user_mode((videomode_t*)inp);
1373
            break;
1390
            break;
Line 1374... Line 1391...
1374
 
1391
 
1375
        case SRV_CREATE_VIDEO:
1392
        case SRV_GET_CAPS:
1376
//            retval = r600_create_video(inp[0], inp[1], outp);
1393
            retval = get_driver_caps((hwcaps_t*)inp);
Line 1377... Line 1394...
1377
            break;
1394
            break;
1378
 
-
 
1379
        case SRV_BLIT_VIDEO:
1395
 
1380
//            r600_video_blit( ((uint64_t*)inp)[0], inp[2], inp[3],
-
 
1381
//                    inp[4], inp[5], inp[6]);
1396
        case SRV_CREATE_SURFACE:
1382
 
1397
//            check_input(8);
Line 1383... Line 1398...
1383
            retval = 0;
1398
            retval = create_surface(main_drm_device, (struct io_call_10*)inp);
1384
            break;
-
 
1385
 
-
 
1386
        case SRV_CREATE_BITMAP:
1399
            break;
1387
            check_input(8);
1400
 
Line -... Line 1401...
-
 
1401
        case SRV_LOCK_SURFACE:
-
 
1402
            retval = lock_surface((struct io_call_12*)inp);
-
 
1403
            break;
-
 
1404
 
1388
            check_output(4);
1405
        case SRV_BLIT_BITMAP:
Line 1389... Line 1406...
1389
//            retval = create_bitmap(outp, inp[0], inp[1]);
1406
            srv_blit_bitmap( inp[0], inp[1], inp[2],
1390
            break;
1407
                        inp[3], inp[4], inp[5], inp[6]);