From: John Sledge Subject: DRM Inquiry Date: Thu, 17 May 2018 12:47:45 +0000 (UTC) Message-ID: <471791572.2287221.1526561265798@mail.yahoo.com> References: <471791572.2287221.1526561265798.ref@mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1361412225==" Return-path: Received: from sonic302-21.consmr.mail.ne1.yahoo.com (sonic302-21.consmr.mail.ne1.yahoo.com [66.163.186.147]) by gabe.freedesktop.org (Postfix) with ESMTPS id F29746E7FD for ; Thu, 17 May 2018 12:47:47 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============1361412225== Content-Type: multipart/alternative; boundary="----=_Part_2287220_654334423.1526561265796" ------=_Part_2287220_654334423.1526561265796 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi All, Good day! I=E2=80=99ve been doing some PTN3460 programming under Linux using C/C++ an= d I have some questions regarding on setting the brightness level to my dis= play device. The display device with PTN3460 is connected in DP (display port) to my com= puter. Only needs a DisplayPort native AUX command to access DPCD address f= rom PTN3460.=C2=A0I=E2=80=99m currently looking into the DRM (Direct Render= ing Manager) a subsystem of the Linux kernel. It has a methods drm_dp_dpcd_= readb, drm_dp_dpcd_read and drm_dp_dpcd_write.=C2=A0 Do you have any suggestions or advice how to use the kernel driver in DRM i= n regards to how to implement the method=C2=A0drm_dp_dpcd_readb for example= ? I couldn't not find any test tool examples that implement it. Biggest con= cern is I don't have sufficient knowledge where to start what to code using= the DRM module. Namedrm_dp_dpcd_readb =E2=80=94 read a single byte from the DPCDSynopsisssi= ze_t drm_dp_dpcd_readb (=C2=A0 =C2=A0 struct drm_dp_aux * aux, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unsigned int offset,= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0u8 * valuep); Argumentsaux - DisplayPort AUX channeloffset - address of the register to r= eadvaluep - location where the value of the register will be storedDescript= ionReturns the number of bytes transferred (1) on success, or a negative er= ror code on failure. Regards,John ------=_Part_2287220_654334423.1526561265796 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Good day!

I=E2=80=99ve been doing some PTN3460 programming under Linux us= ing C/C++ and I have some questions regarding on setting the brightness lev= el to my display device.

The display device with PTN3460 is connected in DP (di= splay port) to my computer. Only needs a DisplayPort native AUX command to = access DPCD address from PTN3460.
 
I=E2=80=99m currently looking into the DRM = (Direct Rendering Manager) a subsystem of the Linux kernel. It has a method= s drm_dp_dpcd_readb, drm_dp_dpcd_read and drm_dp_dpcd_write. 

Do = you have any suggestions or advice how to use the kernel driver in DRM in r= egards to how to implement the method drm_dp_dpcd_readb for example? I= couldn't not find any test tool examples that implement it. Biggest concer= n is I don't have sufficient knowledge where to start what to code using th= e DRM module.

Name
drm_dp_dpcd_readb =E2=80=94 read a single byte from the D= PCD
Synopsis
ssize_t drm_dp_dpcd_readb (    s= truct drm_dp_aux * aux,

       = ;        unsigned int offset,
    &= nbsp;          u8 * valuep);

<= div>Arguments
aux - DisplayPort AUX channel
offset - ad= dress of the register to read
valuep - location where the value o= f the register will be stored
Description
Returns the n= umber of bytes transferred (1) on success, or a negative error code on fail= ure.

Regards,
John
------=_Part_2287220_654334423.1526561265796-- --===============1361412225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1361412225==--