Jump to content

Modifying the Linux driver for the Pine 7 inch DSI display


rhs-jel

Recommended Posts

I need to use a 10 inch 800x600 DSI display in a Pine64 project and I think the easiest way to do this would be to modify the driver for the Pine 7 inch DSI display. It appears to me that the display resolution is hard coded in this driver (panel-feiyang-07024di26a30d.ko) and not supplied by a device tree overlay like some other Armbian SBCs. In the C source for this driver, I see the following data structure which defines a 1024x600 screen size for the 7 inch display ...

 

static const struct drm_display_mode feiyang_default_mode = {
    .clock        = 55000,

    .hdisplay    = 1024,
    .hsync_start    = 1024 + 310,
    .hsync_end    = 1024 + 310 + 20,
    .htotal        = 1024 + 310 + 20 + 90,

    .vdisplay    = 600,
    .vsync_start    = 600 + 12,
    .vsync_end    = 600 + 12 + 2,
    .vtotal        = 600 + 12 + 2 + 21,

    .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
};

 

It looks simple enough to modify these values to work with my 1024x600 display, but I'm unsure what would be the best way to accomplish this. Which of the following could I do?

a) Just rebuild the modified driver alone and drop the new .ko file into the filesystem.

    or

b) Do a full Armbian image build using modified feiyang driver source.

 

Building the driver alone seems simpler, but I have zero experience with doing this sort of thing. I've installed the Linux headers package for the Allwinner A64 and piddled with building a trivial hello-world driver as outlined in the "Linux Kernel Module Programming Guide" doc that's floating around on the web.  That was easy enough to get working, but have no idea what magic incantations would be needed in the makefile for a real driver.

 

Building the Armbian image is appealing to me because the compile.sh script from the Armbian git repo does all the magic driver building for you. If I can somehow insert a modified version of the feiyang driver source into the OS image build process, that would do what I need.

 

So do either of these approaches make any sense at all and if so, can anyone suggest how to do plan A or plan B?  Thanks in advance.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines