<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hey Carl,<div><br></div><div>I had the same problem as you.</div><div><br></div><div>So i wanted my MediaCenter to start up at for example 15h just before i get home. But since my TV and my AV receiver where in standby the resolution detected by the drm driver as always wrong. So to by pass this i have changed a bit intel drm driver and hard coded my TV EDID data directly into the driver. This ways every time the MC starts up it thinks is connected to the PC and setups the right resolution. </div><div><br></div><div>Now this is not a simple thing to do since you will need to compile the linux kernel, you can also only compile the drm driver/module for sure but i dont know how to do that ....</div><div><br></div><div>So what i did was, with some linux software, named edid grab or read or something, i extracted my TV edid in HEX format. Then i changed the function "<span style="font-size: 10pt; ">drm_do_get_edid"</span><span style="font-size: 10pt; "> inside the drm_edid.c file located at the linux kernel/drivers/gpu/drm/  to ignore the i2c bus and to use the edid i defined inside my block1 byte array. Also needed to comment out some code, since EDID something comes in multiple messages. Below you can find my modifications.</span></div><div><span style="font-size: 10pt; "><br></span></div><div><span style="font-size: 10pt; "><br></span></div><div>I hope this help you out. Maybe this is not the right way of doing it, but it worked for me. I´m not and expert on DRM or I915 driver, just wanted to make it worked so i hard coded it all. You can always improve and maybe add the function of reading the EDID from a file like the NVIDIA driver has. </div><div><br></div><div><br></div><div><br></div><div>static u8 *</div><div>drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>int i, j = 0, valid_extensions = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>u8 *block, *new;</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>u8 block1[256] = {0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x34,0xa9,0xa4,0xa0,0x01,0x01,0x01,0x01,</div><div><span class="Apple-tab-span" style="white-space:pre">           </span>       0x00,0x14,0x01,0x03,0x80,0x00,0x00,0x78,0x0a,0xda,0xff,0xa3,0x58,0x4a,0xa2,0x29,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x17,0x49,0x4b,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x3a,0x80,0xd0,0x72,0x38,0x2d,0x40,0x10,0x2c,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x45,0x80,0xba,0x88,0x21,0x00,0x00,0x1e,0x02,0x3a,0x80,0x18,0x71,0x38,0x2d,0x40,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x58,0x2c,0x45,0x00,0xba,0x88,0x21,0x00,0x00,0x1e,0x00,0x00,0x00,0xfc,0x00,0x50,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x61,0x6e,0x61,0x73,0x6f,0x6e,0x69,0x63,0x2d,0x54,0x56,0x0a,0x00,0x00,0x00,0xfd,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x00,0x17,0x3d,0x0f,0x44,0x0f,0x00,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x01,0xd3,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x02,0x03,0x36,0x72,0x50,0x9f,0x90,0x14,0x05,0x20,0x13,0x04,0x12,0x03,0x11,0x02,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x16,0x07,0x15,0x06,0x01,0x23,0x09,0x07,0x01,0x78,0x03,0x0c,0x00,0x10,0x00,0xb8,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x26,0x2f,0xc0,0x0a,0x81,0x49,0xff,0xfc,0x06,0x16,0x08,0x00,0x18,0x00,0x00,0x00,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x00,0x00,0xe3,0x05,0x1f,0x01,0x01,0x1d,0x80,0xd0,0x72,0x1c,0x16,0x20,0x10,0x2c,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x25,0x80,0xba,0x88,0x21,0x00,0x00,0x9e,0x01,0x1d,0x80,0x18,0x71,0x1c,0x16,0x20,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x58,0x2c,0x25,0x00,0xba,0x88,0x21,0x00,0x00,0x9e,0x01,0x1d,0x00,0xbc,0x52,0xd0,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x1e,0x20,0xb8,0x28,0x55,0x40,0xba,0x88,0x21,0x00,0x00,0x1e,0x01,0x1d,0x00,0x72,</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>       0x51,0xd0,0x1e,0x20,0x6e,0x28,0x55,0x00,0xba,0x88,0x21,0x00,0x00,0x1e,0x00,0xb6};</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>//if ((block = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL)</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>return NULL;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if ((block = kmalloc(EDID_LENGTH*2, GFP_KERNEL)) == NULL)</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>return NULL;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>/* base block fetch */</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>//for (i = 0; i < 4; i++) {</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH))</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>//<span class="Apple-tab-span" style="white-space:pre">          </span>goto out;</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>if (drm_edid_block_valid(block))</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>//<span class="Apple-tab-span" style="white-space:pre">          </span>break;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>//<span class="Apple-tab-span" style="white-space:pre">          </span>connector->null_edid_counter++;</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>//<span class="Apple-tab-span" style="white-space:pre">          </span>goto carp;</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>//}</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>//if (i == 4)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>goto carp;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>//DRM_DEBUG_KMS("DUMP EDID START\n");</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>//for(i = 0 ; i < EDID_LENGTH; i += 16 )</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>//<span class="Apple-tab-span" style="white-space:pre">  </span>DRM_DEBUG_KMS("0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x\n",block[i],block[i+1],block[i+2],block[i+3],block[i+4],block[i+5],block[i+6],block[i+7],block[i+8],block[i+9],block[i+10],block[i+11],block[i+12],block[i+13],block[i+14],block[i+15]);</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>//DRM_DEBUG_KMS("\nDUMP EDID END\n");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>DRM_DEBUG_KMS("Overwriting EDID\n");</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>//DRM_DEBUG_KMS("EDID_LENGTH: %d\n",EDID_LENGTH);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>for(i = 0; i < 256; i++)</div><div><span class="Apple-tab-span" style="white-space:pre">          </span>block[i]=block1[i];</div><div><span class="Apple-tab-span" style="white-space:pre">          </span></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>return block;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>/* if there's no extensions, we're done */</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>if (block[0x7e] == 0)</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>return block;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>new = krealloc(block, (block[0x7e] + 1) * EDID_LENGTH, GFP_KERNEL);</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>if (!new)</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>goto out;</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>block = new;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for (j = 1; j <= block[0x7e]; j++) {</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>for (i = 0; i < 4; i++) {</div><div><span class="Apple-tab-span" style="white-space:pre">                 </span>if (drm_do_probe_ddc_edid(adapter,</div><div><span class="Apple-tab-span" style="white-space:pre">                           </span>  block + (valid_extensions + 1) * EDID_LENGTH,</div><div><span class="Apple-tab-span" style="white-space:pre">                         </span>  j, EDID_LENGTH))</div><div><span class="Apple-tab-span" style="white-space:pre">                              </span>goto out;</div><div><span class="Apple-tab-span" style="white-space:pre">                    </span>if (drm_edid_block_valid(block + (valid_extensions + 1) * EDID_LENGTH)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>valid_extensions++;</div><div><span class="Apple-tab-span" style="white-space:pre">                          </span>break;</div><div><span class="Apple-tab-span" style="white-space:pre">                       </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>if (i == 4)</div><div><span class="Apple-tab-span" style="white-space:pre">                  </span>dev_warn(connector->dev->dev,</div><div><span class="Apple-tab-span" style="white-space:pre">                  </span> "%s: Ignoring invalid EDID block %d.\n",</div><div><span class="Apple-tab-span" style="white-space:pre">                  </span> drm_get_connector_name(connector), j);</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>if (valid_extensions != block[0x7e]) {</div><div><span class="Apple-tab-span" style="white-space:pre">               </span>block[EDID_LENGTH-1] += block[0x7e] - valid_extensions;</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>block[0x7e] = valid_extensions;</div><div><span class="Apple-tab-span" style="white-space:pre">              </span>new = krealloc(block, (valid_extensions + 1) * EDID_LENGTH, GFP_KERNEL);</div><div><span class="Apple-tab-span" style="white-space:pre">             </span>if (!new)</div><div><span class="Apple-tab-span" style="white-space:pre">                    </span>goto out;</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>block = new;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>return block;</div><div><br></div><div>carp:</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>dev_warn(connector->dev->dev, "%s: EDID block %d invalid.\n",</div><div><span class="Apple-tab-span" style="white-space:pre">                </span> drm_get_connector_name(connector), j);</div><div><br></div><div>out:</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>kfree(block);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>return NULL;</div><div>}</div><br><div><div id="SkyDrivePlaceholder"></div>> Date: Wed, 16 May 2012 15:48:55 -0400<br>> From: cahunter@cbnco.com<br>> To: intel-gfx@lists.freedesktop.org<br>> Subject: [Intel-gfx] Specific resolution without monitor<br>> <br>> I'm trying to set my xorg.conf file up so that I get a specific <br>> resolution when my monitor is turned off and I reboot my PC.  lspci <br>> shows that I've got a 945GME and Xorg.0.log shows that I'm using version <br>> 2.17.0 of the Intel driver.  I'm running Mythbuntu 11.10.  With my other <br>> systems running the nvidia driver I can use the option <br>> "ConnectedMonitor" to achieve this.  I guess I'm looking for the <br>> equivalent for the Intel driver.<br>> <br>> Thanks<br>> <br>> Carl<br>> _______________________________________________<br>> Intel-gfx mailing list<br>> Intel-gfx@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx<br></div>                                         </div></body>
</html>