GNU gdb (Gentoo 7.5.1 p2) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/lib64/xorg/modules/drivers/nouveau_drv.so...done. (gdb) Dump of assembler code for function drmmode_set_mode_major: 176 kmode->clock = mode->Clock; 0x000000000002633a <+330>: mov 0x20(%r12),%eax 0x0000000000026344 <+340>: mov %eax,0x30(%rsp) 177 kmode->hdisplay = mode->HDisplay; 0x0000000000026348 <+344>: mov 0x24(%r12),%eax 0x0000000000026356 <+358>: mov %ax,0x34(%rsp) 178 kmode->hsync_start = mode->HSyncStart; 0x000000000002635b <+363>: mov 0x28(%r12),%eax 0x0000000000026360 <+368>: mov %ax,0x36(%rsp) 179 kmode->hsync_end = mode->HSyncEnd; 0x0000000000026365 <+373>: mov 0x2c(%r12),%eax 0x000000000002636a <+378>: mov %ax,0x38(%rsp) 180 kmode->htotal = mode->HTotal; 0x000000000002636f <+383>: mov 0x30(%r12),%eax 0x0000000000026374 <+388>: mov %ax,0x3a(%rsp) 181 kmode->hskew = mode->HSkew; 0x0000000000026379 <+393>: mov 0x34(%r12),%eax 0x000000000002637e <+398>: mov %ax,0x3c(%rsp) 182 183 kmode->vdisplay = mode->VDisplay; 0x0000000000026383 <+403>: mov 0x38(%r12),%eax 0x0000000000026388 <+408>: mov %ax,0x3e(%rsp) 184 kmode->vsync_start = mode->VSyncStart; 0x000000000002638d <+413>: mov 0x3c(%r12),%eax 0x0000000000026392 <+418>: mov %ax,0x40(%rsp) 185 kmode->vsync_end = mode->VSyncEnd; 0x0000000000026397 <+423>: mov 0x40(%r12),%eax 0x000000000002639c <+428>: mov %ax,0x42(%rsp) 186 kmode->vtotal = mode->VTotal; 0x00000000000263a1 <+433>: mov 0x44(%r12),%eax 0x00000000000263a6 <+438>: mov %ax,0x44(%rsp) 187 kmode->vscan = mode->VScan; 0x00000000000263ab <+443>: mov 0x48(%r12),%eax 0x00000000000263b0 <+448>: mov %ax,0x46(%rsp) 188 189 kmode->flags = mode->Flags; //& FLAG_BITS; 0x00000000000263b5 <+453>: mov 0x4c(%r12),%eax 0x00000000000263ba <+458>: mov %eax,0x4c(%rsp) 190 if (mode->name) 0x000000000002633f <+335>: mov 0x10(%r12),%rsi 0x000000000002634d <+349>: test %rsi,%rsi 0x00000000000263be <+462>: je 0x263e2 191 strncpy(kmode->name, mode->name, DRM_DISPLAY_MODE_LEN); 0x00000000000263c0 <+464>: lea 0x24(%r9),%rdi 192 kmode->name[DRM_DISPLAY_MODE_LEN-1] = 0; 0x00000000000263ee <+510>: movb $0x0,0x73(%rsp) 193 194 } 195 196 static void 197 drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode) 198 { 199 200 } 201 202 void 203 drmmode_fbcon_copy(ScreenPtr pScreen) 204 { 205 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); 206 NVPtr pNv = NVPTR(pScrn); 207 #if XORG_VERSION_CURRENT >= 10999001 208 ExaDriverPtr exa = pNv->EXADriverPtr; 209 xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); 210 struct nouveau_bo *bo = NULL; 211 PixmapPtr pspix, pdpix; 212 drmModeFBPtr fb; 213 unsigned w = pScrn->virtualX, h = pScrn->virtualY; 214 int i, ret, fbcon_id = 0; 215 216 if (pNv->NoAccel) 217 goto fallback; 218 219 for (i = 0; i < xf86_config->num_crtc; i++) { 220 drmmode_crtc_private_ptr drmmode_crtc = 221 xf86_config->crtc[i]->driver_private; 222 223 if (drmmode_crtc->mode_crtc->buffer_id) 224 fbcon_id = drmmode_crtc->mode_crtc->buffer_id; 225 } 226 227 if (!fbcon_id) 228 goto fallback; 229 230 fb = drmModeGetFB(pNv->dev->fd, fbcon_id); 231 if (!fb) { 232 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, 233 "Failed to retrieve fbcon fb: id %d\n", fbcon_id); 234 goto fallback; 235 } 236 237 if (fb->depth != pScrn->depth || fb->width != w || fb->height != h) { 238 drmFree(fb); 239 goto fallback; 240 } 241 242 ret = nouveau_bo_wrap(pNv->dev, fb->handle, &bo); 243 if (ret) { 244 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, 245 "Failed to retrieve fbcon buffer: handle=0x%08x\n", 246 fb->handle); 247 drmFree(fb); 248 goto fallback; 249 } 250 251 pspix = drmmode_pixmap_wrap(pScreen, fb->width, fb->height, 252 fb->depth, fb->bpp, fb->pitch, bo, NULL); 253 nouveau_bo_ref(NULL, &bo); 254 drmFree(fb); 255 if (!pspix) { 256 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, 257 "Failed to create pixmap for fbcon contents\n"); 258 goto fallback; 259 } 260 261 pdpix = drmmode_pixmap_wrap(pScreen, pScrn->virtualX, 262 pScrn->virtualY, pScrn->depth, 263 pScrn->bitsPerPixel, pScrn->displayWidth * 264 pScrn->bitsPerPixel / 8, pNv->scanout, 265 NULL); 266 if (!pdpix) { 267 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, 268 "Failed to init scanout pixmap for fbcon mirror\n"); 269 pScreen->DestroyPixmap(pspix); 270 goto fallback; 271 } 272 273 exa->PrepareCopy(pspix, pdpix, 0, 0, GXcopy, ~0); 274 exa->Copy(pdpix, 0, 0, 0, 0, w, h); 275 exa->DoneCopy(pdpix); 276 PUSH_KICK(pNv->pushbuf); 277 278 /* wait for completion before continuing, avoids seeing a momentary 279 * flash of "corruption" on occasion 280 */ 281 nouveau_bo_wait(pNv->scanout, NOUVEAU_BO_RDWR, pNv->client); 282 283 pScreen->DestroyPixmap(pdpix); 284 pScreen->DestroyPixmap(pspix); 285 pScreen->canDoBGNoneRoot = TRUE; 286 return; 287 288 fallback: 289 #endif 290 if (nouveau_bo_map(pNv->scanout, NOUVEAU_BO_WR, pNv->client)) 291 return; 292 memset(pNv->scanout->map, 0x00, pNv->scanout->size); 293 } 294 295 static Bool 296 drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, 297 Rotation rotation, int x, int y) 298 { 0x00000000000261f0 <+0>: push %r15 0x00000000000261f2 <+2>: push %r14 0x00000000000261f4 <+4>: push %r13 0x00000000000261f6 <+6>: push %r12 0x00000000000261f8 <+8>: mov %rsi,%r12 0x00000000000261fb <+11>: push %rbp 0x00000000000261fc <+12>: mov %rdi,%rbp 0x00000000000261ff <+15>: push %rbx 0x0000000000026200 <+16>: sub $0x88,%rsp 0x0000000000026219 <+41>: mov %ecx,0x28(%rsp) 0x000000000002621d <+45>: mov %r8d,0x2c(%rsp) 299 ScrnInfoPtr pScrn = crtc->scrn; 0x000000000002620e <+30>: mov 0x8(%rdi),%rax 300 NVPtr pNv = NVPTR(pScrn); 0x000000000002622f <+63>: mov 0x128(%rax),%rdi 301 xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); 0x0000000000026207 <+23>: mov 0x207b72(%rip),%rdx # 0x22dd80 0x0000000000026222 <+50>: movslq (%rdx),%rcx 0x0000000000026225 <+53>: mov 0x130(%rax),%rdx 0x0000000000026236 <+70>: mov (%rdx,%rcx,8),%rbx 302 drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; 0x0000000000026212 <+34>: mov 0x1b0(%rbp),%r14 303 drmmode_ptr drmmode = drmmode_crtc->drmmode; 0x000000000002622c <+60>: mov (%r14),%r13 304 uint32_t *output_ids; 305 int output_count = 0; 306 int ret = TRUE; 307 int i; 308 int fb_id; 309 drmModeModeInfo kmode; 310 311 if (drmmode->fb_id == 0) { 0x000000000002623a <+74>: mov 0x4(%r13),%edx 0x000000000002623e <+78>: test %edx,%edx 0x0000000000026240 <+80>: jne 0x26295 312 unsigned int pitch = 313 pScrn->displayWidth * (pScrn->bitsPerPixel / 8); 0x0000000000026242 <+82>: mov 0x54(%rax),%r8d 0x0000000000026256 <+102>: lea 0x7(%r8),%r9d 0x000000000002625a <+106>: test %r8d,%r8d 0x000000000002625d <+109>: cmovns %r8d,%r9d 0x0000000000026265 <+117>: sar $0x3,%r9d 0x0000000000026269 <+121>: imul 0xb8(%rax),%r9d 314 315 ret = drmModeAddFB(drmmode->fd, 0x0000000000026246 <+86>: movzbl 0x5c(%rax),%ecx 0x000000000002624a <+90>: mov 0xac(%rax),%edx 0x0000000000026250 <+96>: mov 0xa8(%rax),%esi 0x0000000000026261 <+113>: movzbl %r8b,%r8d 0x0000000000026271 <+129>: lea 0x4(%r13),%rax 0x0000000000026275 <+133>: mov %rax,0x8(%rsp) 0x000000000002627e <+142>: mov 0x8(%rax),%eax 0x0000000000026281 <+145>: mov %eax,(%rsp) 0x0000000000026284 <+148>: mov 0x0(%r13),%edi 0x0000000000026288 <+152>: callq 0x6000 316 pScrn->virtualX, pScrn->virtualY, 317 pScrn->depth, pScrn->bitsPerPixel, 318 pitch, pNv->scanout->handle, 0x000000000002627a <+138>: mov 0x20(%rdi),%rax 319 &drmmode->fb_id); 320 if (ret < 0) { 0x000000000002628d <+157>: test %eax,%eax 0x000000000002628f <+159>: js 0x26510 321 ErrorF("failed to add fb\n"); 0x0000000000026510 <+800>: lea 0x33ac(%rip),%rdi # 0x298c3 0x0000000000026517 <+807>: xor %eax,%eax 0x000000000002651c <+812>: callq 0x64d0 322 return FALSE; 0x0000000000026519 <+809>: xor %r15d,%r15d 0x0000000000026521 <+817>: jmpq 0x262a4 0x0000000000026526: nopw %cs:0x0(%rax,%rax,1) 323 } 324 } 325 326 if (!xf86CrtcRotate(crtc)) 0x0000000000026295 <+165>: mov %rbp,%rdi 0x000000000002629b <+171>: callq 0x5d80 0x00000000000262a0 <+176>: test %eax,%eax 0x00000000000262a2 <+178>: jne 0x262c0 327 return FALSE; 0x0000000000026298 <+168>: xor %r15d,%r15d 328 329 output_ids = calloc(sizeof(uint32_t), xf86_config->num_output); 0x00000000000262c0 <+208>: mov (%rbx),%edx 0x00000000000262c2 <+210>: mov $0x4,%edi 0x00000000000262c7 <+215>: movslq %edx,%rsi 0x00000000000262ca <+218>: mov %edx,0x20(%rsp) 0x00000000000262ce <+222>: callq 0x5d70 0x00000000000262d6 <+230>: mov %rax,%r10 330 if (!output_ids) 0x00000000000262d3 <+227>: test %rax,%rax 0x00000000000262d9 <+233>: mov 0x20(%rsp),%edx 0x00000000000262dd <+237>: je 0x262a4 331 return FALSE; 332 333 for (i = 0; i < xf86_config->num_output; i++) { 0x00000000000262df <+239>: test %edx,%edx 0x00000000000262e1 <+241>: jle 0x26328 0x00000000000262e3 <+243>: mov 0x8(%rbx),%rdx 0x00000000000262e7 <+247>: xor %eax,%eax 0x00000000000262e9 <+249>: jmp 0x262fb 0x00000000000262eb <+251>: nopl 0x0(%rax,%rax,1) 0x00000000000262f0 <+256>: add $0x1,%eax 0x00000000000262f3 <+259>: add $0x8,%rdx 0x00000000000262f7 <+263>: cmp %eax,(%rbx) 0x00000000000262f9 <+265>: jle 0x26328 0x0000000000026308 <+280>: add $0x1,%eax 0x000000000002630b <+283>: add $0x8,%rdx 0x0000000000026320 <+304>: cmp %eax,(%rbx) 0x0000000000026322 <+306>: jg 0x262fb 0x0000000000026324 <+308>: nopl 0x0(%rax) 334 xf86OutputPtr output = xf86_config->output[i]; 0x00000000000262fb <+267>: mov (%rdx),%rcx 335 drmmode_output_private_ptr drmmode_output; 336 337 if (output->crtc != crtc) 0x00000000000262fe <+270>: cmp %rbp,0x10(%rcx) 0x0000000000026302 <+274>: jne 0x262f0 338 continue; 339 340 drmmode_output = output->driver_private; 341 output_ids[output_count] = 0x0000000000026315 <+293>: movslq %r15d,%rcx 0x000000000002631c <+300>: mov %esi,(%r10,%rcx,4) 342 drmmode_output->mode_output->connector_id; 0x0000000000026304 <+276>: mov 0x78(%rcx),%rcx 0x000000000002630f <+287>: mov 0x10(%rcx),%rcx 0x0000000000026313 <+291>: mov (%rcx),%esi 343 output_count++; 0x0000000000026318 <+296>: add $0x1,%r15d 344 } 345 346 drmmode_ConvertToKMode(crtc->scrn, &kmode, mode); 0x0000000000026328 <+312>: lea 0x30(%rsp),%r9 347 348 fb_id = drmmode->fb_id; 0x00000000000263f3 <+515>: mov 0x4(%r13),%edx 349 if (crtc->randr_crtc->scanout_pixmap) 0x00000000000263e2 <+498>: mov 0x1b8(%rbp),%rax 0x00000000000263e9 <+505>: xor %ecx,%ecx 0x00000000000263eb <+507>: xor %r8d,%r8d 0x00000000000263f7 <+519>: cmpq $0x0,0x2d0(%rax) 0x00000000000263ff <+527>: je 0x264f0 350 x = y = 0; 351 else if (drmmode_crtc->rotate_fb_id) { 0x00000000000264f0 <+768>: mov 0x30(%r14),%eax 0x00000000000264f4 <+772>: mov 0x2c(%rsp),%r8d 0x00000000000264f9 <+777>: test %eax,%eax 0x00000000000264fb <+779>: cmovne %ecx,%r8d 0x00000000000264ff <+783>: cmovne %eax,%edx 0x0000000000026502 <+786>: cmove 0x28(%rsp),%ecx 0x0000000000026507 <+791>: jmpq 0x26405 0x000000000002650c <+796>: nopl 0x0(%rax) 352 fb_id = drmmode_crtc->rotate_fb_id; 353 x = 0; 354 y = 0; 355 } 356 357 ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0x0000000000026405 <+533>: mov 0x8(%r14),%rax 0x000000000002640e <+542>: mov %r10,%r9 0x0000000000026411 <+545>: mov %r15d,(%rsp) 0x0000000000026415 <+549>: mov 0x0(%r13),%edi 0x0000000000026419 <+553>: mov (%rax),%esi 0x000000000002641b <+555>: mov %r10,0x18(%rsp) 0x0000000000026420 <+560>: callq 0x59c0 0x000000000002642a <+570>: mov %eax,%r12d 358 fb_id, x, y, output_ids, output_count, &kmode); 0x0000000000026409 <+537>: mov %r9,0x8(%rsp) 359 free(output_ids); 0x0000000000026425 <+565>: mov 0x18(%rsp),%r10 0x000000000002642d <+573>: mov %r10,%rdi 0x0000000000026430 <+576>: callq 0x5830 360 361 if (ret) { 0x0000000000026435 <+581>: test %r12d,%r12d 0x0000000000026438 <+584>: jne 0x264b8 362 xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, 0x00000000000264b8 <+712>: mov %r12d,%edi 0x00000000000264be <+718>: neg %edi 0x00000000000264c0 <+720>: callq 0x63d0 0x00000000000264c5 <+725>: mov 0x8(%rbp),%rdx 0x00000000000264c9 <+729>: mov %rax,%rcx 0x00000000000264cc <+732>: mov $0x5,%esi 0x00000000000264d1 <+737>: xor %eax,%eax 0x00000000000264d3 <+739>: mov 0x18(%rdx),%edi 0x00000000000264d6 <+742>: lea 0x33f8(%rip),%rdx # 0x298d5 0x00000000000264dd <+749>: callq 0x5fd0 363 "failed to set mode: %s\n", strerror(-ret)); 364 return FALSE; 0x00000000000264bb <+715>: xor %r15d,%r15d 0x00000000000264e2 <+754>: jmpq 0x262a4 0x00000000000264e7 <+759>: nopw 0x0(%rax,%rax,1) 365 } 366 367 /* Work around some xserver stupidity */ 368 for (i = 0; i < xf86_config->num_output; i++) { 0x000000000002643a <+586>: mov (%rbx),%r15d 0x000000000002643d <+589>: xor %r13d,%r13d 0x0000000000026440 <+592>: test %r15d,%r15d 0x0000000000026443 <+595>: jle 0x26463 0x0000000000026445 <+597>: nopl (%rax) 0x0000000000026456 <+614>: add $0x1,%r12d 0x000000000002645a <+618>: add $0x8,%r13 0x000000000002645e <+622>: cmp %r12d,(%rbx) 0x0000000000026461 <+625>: jg 0x26448 369 xf86OutputPtr output = xf86_config->output[i]; 0x0000000000026448 <+600>: mov 0x8(%rbx),%rax 0x000000000002644c <+604>: mov (%rax,%r13,1),%rdi 370 371 if (output->crtc != crtc) 0x0000000000026450 <+608>: cmp %rbp,0x10(%rdi) 0x0000000000026454 <+612>: je 0x264a8 372 continue; 373 374 drmmode_output_dpms(output, DPMSModeOn); 0x00000000000264a8 <+696>: xor %esi,%esi 0x00000000000264aa <+698>: callq 0x25400 0x00000000000264af <+703>: nop 0x00000000000264b0 <+704>: jmp 0x26456 0x00000000000264b2 <+706>: nopw 0x0(%rax,%rax,1) 375 } 376 377 crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, 0x0000000000026463 <+627>: mov 0x1a8(%rbp),%rax 0x000000000002646a <+634>: mov 0x490(%rbp),%rcx 0x0000000000026471 <+641>: mov %rbp,%rdi 0x0000000000026474 <+644>: mov 0x488(%rbp),%rdx 0x000000000002647b <+651>: mov 0x480(%rbp),%rsi 0x0000000000026488 <+664>: mov 0x498(%rbp),%r8d 0x000000000002648f <+671>: callq *0x48(%rax) 378 crtc->gamma_blue, crtc->gamma_size); 379 380 xf86_reload_cursors(crtc->scrn->pScreen); 0x0000000000026492 <+674>: mov 0x8(%rbp),%rax 0x0000000000026496 <+678>: mov 0x10(%rax),%rdi 0x000000000002649a <+682>: callq 0x5a80 381 382 return TRUE; 0x0000000000026482 <+658>: mov $0x1,%r15d 0x000000000002649f <+687>: jmpq 0x262a4 0x00000000000264a4 <+692>: nopl 0x0(%rax) 383 } 0x00000000000262a4 <+180>: add $0x88,%rsp 0x00000000000262ab <+187>: mov %r15d,%eax 0x00000000000262ae <+190>: pop %rbx 0x00000000000262af <+191>: pop %rbp 0x00000000000262b0 <+192>: pop %r12 0x00000000000262b2 <+194>: pop %r13 0x00000000000262b4 <+196>: pop %r14 0x00000000000262b6 <+198>: pop %r15 0x00000000000262b8 <+200>: retq 0x00000000000262b9 <+201>: nopl 0x0(%rax) End of assembler dump. (gdb) quit