Sorry, you need to enable JavaScript to visit this website.

Access DPCD via NativeAux

5 posts / 0 new
h's picture
Starter
h

Sep 02, 2014 - 04:01am

  • h's picture
    h

    p { margin-bottom: 0.25cm; line-height: 120%; }

    Hello!

     

    I am running a LCD-Display via DisplayPort with a Intel HD Graphics 3000.

     

    Is there a way to access the DPCD via NativeAux?

     

    I found out, tha the old i915-graphic-cards from Intel were supporting Reading an Writing to DPCD-registers. But I didn't found a way to do so with Intel HD Graphics 3000.

     

    Thank you for every answer!

    Sep 02, 2014 - 04:01am
  • h's picture
    h

    i915 is not just a Graphics-Chipset from 2004 it is the graphic-driver-name for the Intel HD Graphic 3000.

    The i915 graphic driver exports the the function drm_dp_dpcd_write and drm_dp_dpcd_read in file drm_dp_helper.c through EXPORT_SYMBOL(...).

    So it is should be possible to acces DPCD through an selfwritten Kernel-Module.

    Does anyone know if drm_dp_dpcd_write and drm_dp_dpcd_read is maybe already available in sysfs or through SytemIO?

     

    Sep 09, 2014 - 02:27am
  • The short answer is, no.

    Oct 01, 2014 - 08:22pm
  • h's picture
    h

    Hey there, I thought now about to write a Kernel Module to access the Display Port Helper Functions. Here is a code snippet:

     

    int ret;
    struct drm_dp_aux mydp =
    {
        //Init of this struct is missing...
    };
    ret = drm_dp_aux_register(&mydp);
    if ( ret == 0 )
    {
        printk(PRIO "Init Successful\n");
        drm_dp_writeb(&mydp, ADDRESS, VALUE);  //ADDRESS and VALUE are user-defined by me
    }
    else
        printk("PRIO "Error on registration %d\n", ret");
    drm_dp_aux_unregister(&mydp);
    

     

    My Problem is now, that I don't know how to initialize the struc mydp. The Reference in the Link above says that I need the pointer to the struct device that is the parent for this AUX channel. Does anyone know where I can find out the parent?

    Thanks alot!

    Luke

    Oct 13, 2014 - 04:12am
  • h's picture
    h

    Sorry, forgot to post the link for the DP-Helper-Functions:
    https://www.kernel.org/doc/htmldocs/drm/ch02s05.html#idp8801968

     

    Oct 20, 2014 - 12:14am
  • h's picture
    h

    Hey there!

    I figured out a Solution! :-)

    I'm gonna try to explain, what I did in short:

    I downloaded the actual Linuxkernel (3.16) from kernel.org and edited the intel_dp.c file within the folder drivers/gpu/drm/i915/ to get the Pointer to the Struct in this way:

    1. Insert the fallowing lines:

    static struct drm_dp_aux *static_dp_aux_ptr;
    static struct drm_dp_aux* intel_dp_aux_get_struct(void){
        if (static_dp_aux_ptr == NULL)
            printk(KERN_INFO "Backlight: Could not init the aux_ptr!\n");
        return static_dp_aux_ptr;
    }
    EXPORT_SYMBOL(intel_dp_aux_get_struct);
    static void intel_dp_aux_set_struct(struct drm_dp_aux *dp_aux){
        static_dp_aux_ptr = dp_aux;
    }

    2. insert this line at the end of the "static void intel_dp_aux_init(...)"-function

    intel_dp_aux_set_struct(&intel_dp->aux); //Inserted by Lukas Hofstaetter

     

    Thereby I was able to get the requiered pointer for the Helperfuncitons of drm/drm_dp_helper.h wthin an selfwritten KernelModule.

     

     

     

    May 11, 2015 - 07:06am
  • Topic locked