Subversion Repositories Kolibri OS

Rev

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

Rev 2160 Rev 2175
Line 985... Line 985...
985
#define SRV_ENUM_MODES  1
985
#define SRV_ENUM_MODES  1
986
#define SRV_SET_MODE    2
986
#define SRV_SET_MODE    2
Line 987... Line 987...
987
 
987
 
988
#define SRV_CREATE_VIDEO 9
988
#define SRV_CREATE_VIDEO 9
-
 
989
#define SRV_BLIT_VIDEO   10
-
 
990
#define SRV_CREATE_BITMAP  11
Line 989... Line 991...
989
#define SRV_BLIT_VIDEO   10
991
 
990
 
992
 
Line -... Line 993...
-
 
993
int r600_video_blit(uint64_t src_offset, int  x, int y,
-
 
994
                    int w, int h, int pitch);
-
 
995
 
-
 
996
#define check_input(size) \
-
 
997
    if( unlikely((inp==NULL)||(io->inp_size != (size))) )   \
-
 
998
        break;
-
 
999
 
-
 
1000
#define check_output(size) \
991
int r600_video_blit(uint64_t src_offset, int  x, int y,
1001
    if( unlikely((outp==NULL)||(io->out_size != (size))) )   \
992
                    int w, int h, int pitch);
1002
        break;
993
 
1003
 
994
int _stdcall display_handler(ioctl_t *io)
1004
int _stdcall display_handler(ioctl_t *io)
995
{
1005
{
Line 1001... Line 1011...
1001
    outp = io->output;
1011
    outp = io->output;
Line 1002... Line 1012...
1002
 
1012
 
1003
    switch(io->io_code)
1013
    switch(io->io_code)
1004
    {
1014
    {
1005
        case SRV_GETVERSION:
1015
        case SRV_GETVERSION:
1006
            if(io->out_size==4)
-
 
1007
            {
1016
            check_output(4);
1008
                *outp  = API_VERSION;
1017
                *outp  = API_VERSION;
1009
                retval = 0;
-
 
1010
            }
1018
                retval = 0;
Line 1011... Line 1019...
1011
            break;
1019
            break;
1012
 
1020
 
1013
        case SRV_ENUM_MODES:
1021
        case SRV_ENUM_MODES:
1014
            dbgprintf("SRV_ENUM_MODES inp %x inp_size %x out_size %x\n",
-
 
1015
                       inp, io->inp_size, io->out_size );
1022
            dbgprintf("SRV_ENUM_MODES inp %x inp_size %x out_size %x\n",
1016
 
-
 
1017
            if( radeon_modeset &&
1023
                       inp, io->inp_size, io->out_size );
1018
                (outp != NULL) && (io->out_size == 4) &&
1024
            check_output(4);
1019
                (io->inp_size == *outp * sizeof(videomode_t)) )
1025
            check_input(*outp * sizeof(videomode_t));
1020
            {
-
 
1021
                retval = get_modes((videomode_t*)inp, outp);
1026
            if( radeon_modeset)
Line 1022... Line 1027...
1022
            };
1027
                retval = get_modes((videomode_t*)inp, outp);
1023
            break;
1028
            break;
1024
 
1029
 
1025
        case SRV_SET_MODE:
-
 
1026
            dbgprintf("SRV_SET_MODE inp %x inp_size %x\n",
-
 
1027
                       inp, io->inp_size);
-
 
1028
 
1030
        case SRV_SET_MODE:
1029
            if(  radeon_modeset   &&
1031
            dbgprintf("SRV_SET_MODE inp %x inp_size %x\n",
1030
                (inp != NULL) &&
1032
                       inp, io->inp_size);
1031
                (io->inp_size == sizeof(videomode_t)) )
-
 
1032
            {
1033
            check_input(sizeof(videomode_t));
Line 1033... Line 1034...
1033
                retval = set_user_mode((videomode_t*)inp);
1034
            if( radeon_modeset )
1034
            };
1035
                retval = set_user_mode((videomode_t*)inp);
1035
            break;
1036
            break;
Line 1043... Line 1044...
1043
                    inp[4], inp[5], inp[6]);
1044
                    inp[4], inp[5], inp[6]);
Line 1044... Line 1045...
1044
 
1045
 
1045
            retval = 0;
1046
            retval = 0;
Line -... Line 1047...
-
 
1047
            break;
-
 
1048
 
-
 
1049
        case SRV_CREATE_BITMAP:
-
 
1050
            check_input(8);
-
 
1051
            check_output(4);
-
 
1052
            retval = create_bitmap(outp, inp[0], inp[1]);
1046
            break;
1053
            break;
Line 1047... Line 1054...
1047
 
1054
 
1048
    };
1055
    };