Skip to content

Some details noted #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ changes are necessary for upstreaming the generated panel driver.
- Input device tree:
[`dsi_panel_S6E88A0_AMS452EF01_qhd_octa_video.dtsi`](https://gist.github.com/Minecrell/56c2b20118ba00a9723f0785301bc5ec#file-dsi_panel_s6e88a0_ams452ef01_qhd_octa_video-dtsi)
- Generated panel driver:
[`panel-s6e88a0-ams452ef01.c`](https://gist.github.com/Minecrell/bc5fbfc3ba98873d32c07793d6997172#file-panel-s6e88a0-ams452ef01-c),
[`panel-s6e88a0-ams452ef01.c`](https://gist.github.com/Minecrell/bc5fbfc3ba98873d32c07793d6997172#file-panel-s6e88a0-ams452ef01-c)
[`panel-simple-s6e88a0-ams452ef01.c`](https://gist.github.com/Minecrell/bc5fbfc3ba98873d32c07793d6997172#file-panel-simple-s6e88a0-ams452ef01-c)
- Precurser to this generator was the work of Rob Clark on the Sony Z3 msm8974 panel drivers with Freedreno:
[`panel-auo-novatek-1080p-vid.c`](https://github.com/freedreno/kernel-msm/blob/xperiadev/drivers/gpu/drm/panel/panel-auo-novatek-1080p-vid.c)
- Mainlined panel driver:
[`panel-samsung-s6e88a0-ams452ef01.c`](https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c)
- Example for msm8974 on how to set up dtsi:
[`Sony Z3`](https://github.com/freedreno/kernel-msm/commits/xperiadev/arch/arm/boot/dts)

## Preparation
### Requirements
Expand Down
10 changes: 6 additions & 4 deletions driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ def generate_driver(p: Panel, options: Options) -> None:
module = f"panel-{dash_id}"
with open(f'{p.id}/{module}.c', 'w') as f:
f.write(f'''\
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) {datetime.date.today().year} FIXME
// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
// Copyright (c) 2013, The Linux Foundation. All rights reserved. (FIXME)
/*
* SPDX-License-Identifier: GPL-2.0-only
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SPDX-License-Identifier should be a // comment, see https://www.kernel.org/doc/html/latest/process/license-rules.html#license-identifier-syntax

For the other Copyright text it varies in the kernel tree. Most are using /* ... */, but there are also some which are not, see e.g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c

So I think it might be fine to keep this as-is. What do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that SPDX as // struck me around the time i hit the pillow. Well, I'm two phased there, perhaps it's a good idea to encourage people to get to know the script a little and edit as needed as nothing can be guaranteed as perfect, but on the other hand, just grabbing it, generating a panel file and then just editing the output a bit would be optimal as well.

Cheers and thanks for all the panel drivers!

* Copyright (c) {datetime.date.today().year} FIXME
* Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
* Copyright (c) 2013, The Linux Foundation. All rights reserved. (FIXME)
*/
{generate_includes(p, options)}

{generate_struct(p, options)}
Expand Down
11 changes: 6 additions & 5 deletions lk.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ def generate_lk_driver(p: Panel) -> None:

with open(f'{p.id}/lk_panel_{p.id}.h', 'w') as f:
f.write(f'''\
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (c) {datetime.date.today().year} FIXME
// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
// Copyright (c) 2014, The Linux Foundation. All rights reserved. (FIXME)

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (c) {datetime.date.today().year} FIXME
* Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
* Copyright (c) 2014, The Linux Foundation. All rights reserved. (FIXME)
*/
#ifndef {define}
#define {define}

Expand Down