Subversion Repositories Kolibri OS

Rev

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

Rev 4557 Rev 4560
Line 59... Line 59...
59
    void      (*disable_mouse)(void);
59
    void      (*disable_mouse)(void);
60
    u32  mask_seqno;
60
    u32  mask_seqno;
61
    u32  check_mouse;
61
    u32  check_mouse;
62
    u32  check_m_pixel;
62
    u32  check_m_pixel;
63
 
63
};
64
};
-
 
65
 
64
 
Line 66... Line 65...
66
 
65
 
-
 
66
static display_t *os_display;
Line 67... Line 67...
67
static display_t *os_display;
67
struct drm_i915_gem_object *main_fb_obj;
68
 
68
 
Line 69... Line 69...
69
u32_t cmd_buffer;
69
u32_t cmd_buffer;
Line 81... Line 81...
81
 
81
 
Line 82... Line 82...
82
void disable_mouse(void)
82
void disable_mouse(void)
83
{};
83
{};
Line -... Line 84...
-
 
84
 
84
 
85
 
85
static char *manufacturer_name(unsigned char *x)
86
static char *manufacturer_name(unsigned char *x)
86
{
87
{
Line 87... Line 88...
87
    static char name[4];
88
    static char name[4];
Line 104... Line 105...
104
    struct drm_display_mode *mode       = NULL, *tmpmode;
105
    struct drm_display_mode *mode       = NULL, *tmpmode;
105
    struct drm_framebuffer  *fb         = NULL;
106
    struct drm_framebuffer  *fb         = NULL;
106
    struct drm_crtc         *crtc;
107
    struct drm_crtc         *crtc;
107
    struct drm_encoder      *encoder;
108
    struct drm_encoder      *encoder;
108
    struct drm_i915_gem_object *fb_obj;
109
    struct drm_mode_set     set;
109
    struct drm_mode_set     set;
-
 
110
    const char *con_name;
110
    const char *con_name;
111
    const char *enc_name;
111
    const char *enc_name;
112
    unsigned hdisplay, vdisplay;
112
    unsigned hdisplay, vdisplay;
113
    int stride;
113
    int stride;
114
    int ret;
114
    int ret;
Line 162... Line 162...
162
 
162
 
Line 163... Line 163...
163
    if (crtc->invert_dimensions)
163
    if (crtc->invert_dimensions)
164
        swap(hdisplay, vdisplay);
164
        swap(hdisplay, vdisplay);
Line 165... Line -...
165
 
-
 
166
    fb_obj = get_fb_obj();
165
 
Line 167... Line 166...
167
    fb = fb_helper->fb;
166
    fb = fb_helper->fb;
168
 
167
 
Line 169... Line 168...
169
    fb->width  = reqmode->width;
168
    fb->width  = reqmode->width;
170
    fb->height = reqmode->height;
169
    fb->height = reqmode->height;
171
 
170
 
Line 172... Line 171...
172
    if(dev_priv->mm.bit_6_swizzle_x != I915_BIT_6_SWIZZLE_NONE)
171
    if(dev_priv->mm.bit_6_swizzle_x != I915_BIT_6_SWIZZLE_NONE)
173
    {
172
    {
174
        fb_obj->tiling_mode = I915_TILING_X;
173
        main_fb_obj->tiling_mode = I915_TILING_X;
175
 
174
 
176
        if(IS_GEN3(dev))
175
        if(IS_GEN3(dev))
177
            for (stride = 512; stride < reqmode->width * 4; stride <<= 1);
176
            for (stride = 512; stride < reqmode->width * 4; stride <<= 1);
178
        else
177
        else
179
            stride = ALIGN(reqmode->width * 4, 512);
178
            stride = ALIGN(reqmode->width * 4, 512);
180
    }
179
    }
181
    else
180
    else
Line 182... Line 181...
182
    {
181
    {
183
        fb_obj->tiling_mode = I915_TILING_NONE;
182
        main_fb_obj->tiling_mode = I915_TILING_NONE;
184
        stride = ALIGN(reqmode->width * 4, 64);
183
        stride = ALIGN(reqmode->width * 4, 64);
185
    }
184
    }
Line 186... Line 185...
186
 
185
 
Line 187... Line 186...
187
    fb->pitches[0]  =
186
    fb->pitches[0]  =
188
    fb->pitches[1]  =
187
    fb->pitches[1]  =
Line 189... Line 188...
189
    fb->pitches[2]  =
188
    fb->pitches[2]  =
190
    fb->pitches[3]  = stride;
189
    fb->pitches[3]  = stride;
191
 
190
 
Line 192... Line 191...
192
    fb_obj->stride  = stride;
191
    main_fb_obj->stride  = stride;
Line 193... Line 192...
193
 
192
 
194
    fb->bits_per_pixel = 32;
193
    fb->bits_per_pixel = 32;
195
    fb->depth = 24;
194
    fb->depth = 24;
196
 
195
 
Line 929... Line 928...
929
        drm_gem_object_unreference_unlocked(obj);
928
        drm_gem_object_unreference_unlocked(obj);
930
        return -EINVAL;
929
        return -EINVAL;
931
    }
930
    }
932
 
931
 
Line 933... Line 932...
933
#if 1
932
#if 0
934
    if(warn_count < 1000)
933
    if(warn_count < 1000)
935
    {
934
    {
936
        printf("left %d top %d right %d bottom %d\n",
935
        printf("left %d top %d right %d bottom %d\n",
937
                ml, mt, mr, mb);
936
                ml, mt, mr, mb);
938
        warn_count++;
937
        warn_count++;