All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@frijolero.org>
To: "Ozan Çağlayan" <ozancag@gmail.com>
Cc: lf_driver_backport@lists.linux-foundation.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [Lf_driver_backport] [ANN] compat-drm tree
Date: Thu, 28 Jun 2012 12:38:44 -0700	[thread overview]
Message-ID: <CAB=NE6VvKp6Nq1K4in__HkCY555F9A2FpGqdARVGh8gMu2h3jg@mail.gmail.com> (raw)
In-Reply-To: <CAFub=KTCfQajgKLHJvymXT7SO_9AMxrxdraeYzeiM69oiTaPUQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

On Wed, Jun 27, 2012 at 3:27 PM, Ozan Çağlayan <ozancag@gmail.com> wrote:
> Hi,
>
> I'm maintaining a compat-drm tree (based on compat.git) as part of my
> GSoC project with Linux Foundation, under the mentorship of Luis R.
> Rodriguez.
>
> The aim of the tree is to offer the latest DRM stuff to people stuck
> with older kernels (Currently all of the popular and maintained drm
> drivers except i915 (there's an i2c think that I couldn't backport
> yet) from linux-next can be built against kernels down to 3.0).
>
> The tree is on github. I've set up a shiny github pages for it:
>  http://ozancaglayan.github.com/compat-drm/

Great job!

Given that the compat module is shared, and a quite a bit of other
code / style is shared, and I'd love to see us start to formalize
documenting collateral evolutions on the kernel in one place I'd like
to propose to you merging this into compat-wirless and we then rename
the project to compat-drivers, with you maintaining the drm
components. This also gives us an already established quick outlet for
redistribution as well. What do you think?

Some comments:

In the patches/ directory if you can add a description on the top of
each patch explaining *why* that collateral evolution was not
backportable through compat it would help. It sets the standard for
others introducing similar types of patches.

For patches/00-vga_switcheroo_client_ops.patch:

I wonder if you may be able to get rid of this patch. The attached
patch is an RFC patch for compat.git which explains how I'm thinking
this may be possible, I don't have time to test it but let me know
what you think.

Great work though!

  Luis

[-- Attachment #2: vga_switcheroo_client_ops.patch --]
[-- Type: application/octet-stream, Size: 3394 bytes --]

From 6712259efa4531d46aafb7ec42e1863c2c2eeb59 Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <mcgrof@frijolero.org>
Date: Thu, 28 Jun 2012 12:30:54 -0700
Subject: [PATCH] compat: backport vga_switcheroo_client_ops addition

This backports this commit:

commit 26ec685ff9d9c16525d8ec4c97e52fcdb187b302
Author: Takashi Iwai <tiwai@suse.de>
Date:   Fri May 11 07:51:17 2012 +0200

    vga_switcheroo: Introduce struct vga_switcheroo_client_ops

    This changes the API as a clean-up.  Instead of passing multiple
    function pointers at each time, introduce a new struct holding the
    whole callback functions and pass it to the registration.

    The same struct will be used for the upcoming audio client
    registration, too.

    Signed-off-by: Takashi Iwai <tiwai@suse.de>

mcgrof@tux ~/linux-stable (git::master)$ git describe --contains 26ec685
v3.5-rc1~83^2~6

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
---
 compat/Makefile                |    1 +
 compat/compat-3.5.c            |   20 ++++++++++++++++++++
 include/linux/compat-3.5.h     |    3 +++
 include/linux/vga_switcheroo.h |    7 +++++++
 4 files changed, 31 insertions(+)
 create mode 100644 compat/compat-3.5.c

diff --git a/compat/Makefile b/compat/Makefile
index c661f5d..08b5fd7 100644
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -43,6 +43,7 @@ compat-$(CONFIG_COMPAT_KERNEL_3_3) += \
 	compat-3.3.o \
 	flow_dissector.o
 compat-$(CONFIG_COMPAT_KERNEL_3_4) += compat-3.4.o
+compat-$(CONFIG_COMPAT_KERNEL_3_5) += compat-3.5.o
 
 compat-$(CONFIG_COMPAT_CORDIC) += cordic.o
 compat-$(CONFIG_COMPAT_CRC8) += crc8.o
diff --git a/compat/compat-3.5.c b/compat/compat-3.5.c
new file mode 100644
index 0000000..2daa222
--- /dev/null
+++ b/compat/compat-3.5.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2012  Luis R. Rodriguez <mcgrof@frijolero.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Compatibility file for Linux wireless for kernels 3.5.
+ */
+
+#include <linux/vga_switcheroo.h>
+
+int compat_vga_switcheroo_register_client(struct pci_dev *dev,
+					  const struct vga_switcheroo_client_ops *ops)
+{
+	return vga_switcheroo_register_client(dev,
+					      ops->set_gpu_state,
+					      ops->can_switch);
+}
+EXPORT_SYMBOL_GPL(compat_vga_switcheroo_register_client);
diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h
index 74c8176..857aff7 100644
--- a/include/linux/compat-3.5.h
+++ b/include/linux/compat-3.5.h
@@ -8,6 +8,9 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
 
+#define vga_switcheroo_register_client(_dev, _ops) \
+	compat_vga_switcheroo_register_client(_dev, _ops)
+
 /*
  * This backports:
  *
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h
index 4bda17b..0e4775a 100644
--- a/include/linux/vga_switcheroo.h
+++ b/include/linux/vga_switcheroo.h
@@ -9,4 +9,11 @@
 #define LINUX_VGA_SWITCHEROO_H
 #endif /* case 1 LINUX_VGA_SWITCHEROO_H */
 #endif /* case 2 LINUX_VGA_SWITCHEROO_H */
+
+struct vga_switcheroo_client_ops {
+	void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state);
+	void (*reprobe)(struct pci_dev *dev);
+	bool (*can_switch)(struct pci_dev *dev);
+};
+
 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
-- 
1.7.10.rc1.22.gf5241


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2012-06-28 19:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 22:27 [ANN] compat-drm tree Ozan Çağlayan
2012-06-28 19:38 ` Luis R. Rodriguez [this message]
2012-06-29 10:35   ` [Lf_driver_backport] " Ozan Çağlayan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB=NE6VvKp6Nq1K4in__HkCY555F9A2FpGqdARVGh8gMu2h3jg@mail.gmail.com' \
    --to=mcgrof@frijolero.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lf_driver_backport@lists.linux-foundation.org \
    --cc=ozancag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.