List of commits:
Subject Hash Author Date (UTC)
minor management c9d861c8bed7eb9e350245a3114ef6dd3cc37004 Sylvain BERTRAND 2013-03-04 17:27:04
linux 3.8.0 df5ce6b90332feec174c48c3947a3d635fb3cfdd Sylvain BERTRAND 2013-02-28 22:48:17
upstream: new pci ids 79cd8f97c27c895a4187b36f94fa1b432653555c Sylvain BERTRAND 2012-10-17 11:40:08
triangle basic pattern working 97faa34485d6d8b7b19dd54740d5f71fdae7691f Sylvain BERTRAND 2012-10-09 00:55:39
more regs b04101d3e2fcc6d5bac47c3b7999a63b8e70ec86 Sylvain BERTRAND 2012-10-06 13:49:36
add CPs interrupts 35f9940a0ac89e875d852b8ca32009954d92faa5 Sylvain BERTRAND 2012-10-06 13:23:06
tiling, hdp fixes aacf6796f68771f4f6b680844ae495147849ec64 Sylvain BERTRAND 2012-10-06 02:51:51
minor cps cleanup ed2a417ef5177972951226b2d6988257ab66c935 Sylvain BERTRAND 2012-10-05 11:04:15
pattern: triangle, not crashing the GPU anymore 8d21ea32a699a9796e2c89fd69469d4f3da3f96d Sylvain BERTRAND 2012-09-27 13:09:55
triangle pattern code, not working 750cb80c49e44266398ff9c920192b5b5d7ba5a1 Sylvain BERTRAND 2012-09-26 18:13:46
linux 3.5.3 abd704f81d01024f1398b51fbb29e429f6f60ec2 Sylvain BERTRAND 2012-09-12 12:08:29
hw deals properly with pwr gating crtc pairs b5c8a75222e00819814dcff0a4042cd186ebb4ec Sylvain BERTRAND 2012-09-03 09:39:54
upstream: agressive shutdown of memory requests 1e88e5a202ba227e7d5e95f7047b8ee7ca647792 Sylvain BERTRAND 2012-08-22 23:19:59
towards basic GPU programming 01acf921a2efddf521967487865a49347f3f4045 Sylvain BERTRAND 2012-08-16 00:28:19
triangle pattern plumbering 853a73e0052f48b9183f16d02ea9398a2556d040 Sylvain BERTRAND 2012-08-13 15:26:43
pattern ioctl, framebuffer fill pattern 9c59bb9b9c16bbb822587b2a44ab38f38a4371ac Sylvain BERTRAND 2012-08-12 10:51:09
context clear of command processors 9e02a78b903706e3df0af0abc24322c62317c13e Sylvain BERTRAND 2012-08-09 23:09:38
register love de4d6c0aa40f2ca9f2d69190d14bc651f7612b06 Sylvain BERTRAND 2012-08-09 22:55:11
mainly cosmetics 11a2377b2c41cc118078170e6e6fb589fc5937a0 Sylvain BERTRAND 2012-08-09 08:04:21
try to improve stability 25211097e7ecfd370feed5c5d682d26d80c96ae2 Sylvain BERTRAND 2012-08-05 18:40:17
Commit c9d861c8bed7eb9e350245a3114ef6dd3cc37004 - minor management
Author: Sylvain BERTRAND
Author date (UTC): 2013-03-04 17:27
Committer name: Sylvain BERTRAND
Committer date (UTC): 2013-03-04 17:27
Parent(s): df5ce6b90332feec174c48c3947a3d635fb3cfdd
Signer:
Signing key:
Signing status: N
Tree: daa0dbe9331d10856802590d4add89ed56a729be
File Lines added Lines deleted
drivers/gpu/alga/amd/si/drv.c 34 9
drivers/gpu/alga/amd/si/drv.h 2 1
drivers/gpu/alga/amd/si/fops.c 1 1
drivers/gpu/alga/amd/si/fops.h 1 1
File drivers/gpu/alga/amd/si/drv.c changed (mode: 100644) (index 592cb32..93f009f)
11 11 #include <linux/module.h> #include <linux/module.h>
12 12 #include <linux/cdev.h> #include <linux/cdev.h>
13 13 #include <linux/fs.h> #include <linux/fs.h>
14 #include <linux/idr.h>
14 15
15 16 #include <alga/rng_mng.h> #include <alga/rng_mng.h>
16 17 #include <alga/pixel_fmts.h> #include <alga/pixel_fmts.h>
 
33 34 #include "bus/hdp.h" #include "bus/hdp.h"
34 35 #include "bus/bif.h" #include "bus/bif.h"
35 36
37 #define GPUS_MAX 256
38 static DEFINE_IDA(ida);
39
36 40 static struct class *class; static struct class *class;
37 41
38 42 static struct atb_dev adev; static struct atb_dev adev;
 
... ... static void extern_wr32(struct device *dev, u32 val, unsigned of)
90 94 wr32(pdev, val, of); wr32(pdev, val, of);
91 95 } }
92 96
93 static void * __init rom_copy_get(struct pci_dev *dev)
97 static void *rom_copy_get(struct pci_dev *dev)
94 98 { {
95 99 void __iomem *rom; void __iomem *rom;
96 100 void *rom_copy; void *rom_copy;
 
... ... static void bif_mc_mem_reqs_ena(struct pci_dev *dev)
129 133 bif_hdp_ena(dev); bif_hdp_ena(dev);
130 134 } }
131 135
132 static int __init bars_map(struct pci_dev *dev)
136 static int bars_map(struct pci_dev *dev)
133 137 { {
134 138 struct dev_drv_data *dd; struct dev_drv_data *dd;
135 139 dd = pci_get_drvdata(dev); dd = pci_get_drvdata(dev);
 
... ... static void cfg_init(struct pci_dev *dev)
188 192 gpu_cfg_init(dev); gpu_cfg_init(dev);
189 193 } }
190 194
191 static int __init probe(struct pci_dev *dev, const struct pci_device_id *id)
195 static int probe(struct pci_dev *dev, const struct pci_device_id *id)
192 196 { {
193 197 int r; int r;
194 198 struct dev_drv_data *dd; struct dev_drv_data *dd;
 
... ... static int __init probe(struct pci_dev *dev, const struct pci_device_id *id)
413 417 /*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
414 418 /* userland interface setup */ /* userland interface setup */
415 419 cdev_init(&dd->si_cdev, &fops); cdev_init(&dd->si_cdev, &fops);
416 r = cdev_add(&dd->si_cdev, devt, 1);
420
421 r = ida_simple_get(&ida, 0, GPUS_MAX, GFP_KERNEL);
422 if (r < 0) {
423 if (r == -ENOMEM) {
424 dev_err(&dev->dev, "no memory for minor\n");
425 } else if (r == -ENOSPC) {
426 dev_err(&dev->dev, "no more room for new minor\n");
427 } else {
428 dev_err(&dev->dev, "minor allocation failed\n");
429 }
430 goto err_shutdown_dce6;
431 }
432 dd->minor=(unsigned int)r;
433
434 r = cdev_add(&dd->si_cdev, MKDEV(MAJOR(devt_region), dd->minor), 1);
417 435 if (r) { if (r) {
418 436 dev_err(&dev->dev, "cannot add register char device\n"); dev_err(&dev->dev, "cannot add register char device\n");
419 goto err_shutdown_dce6;
437 goto err_free_minor;
420 438 } }
421 439
422 440 dd->si_dev = device_create(class, &dev->dev, dd->si_cdev.dev, NULL, dd->si_dev = device_create(class, &dev->dev, dd->si_cdev.dev, NULL,
423 "si0");
441 "si%u", dd->minor);
424 442 if (IS_ERR(dd->si_dev)) { if (IS_ERR(dd->si_dev)) {
425 443 dev_err(&dev->dev, "cannot create userspace char device\n"); dev_err(&dev->dev, "cannot create userspace char device\n");
426 444 goto err_cdev_del; goto err_cdev_del;
 
... ... static int __init probe(struct pci_dev *dev, const struct pci_device_id *id)
433 451 err_cdev_del: err_cdev_del:
434 452 cdev_del(&dd->si_cdev); cdev_del(&dd->si_cdev);
435 453
454 err_free_minor:
455 ida_simple_remove(&ida, dd->minor);
456
436 457 err_shutdown_dce6: err_shutdown_dce6:
437 458 dce6_shutdown(dd->dce); dce6_shutdown(dd->dce);
438 459 pci_clear_master(dev); pci_clear_master(dev);
 
... ... static void __exit remove(struct pci_dev *dev)
504 525 /* remove userland interface */ /* remove userland interface */
505 526 device_destroy(class, dd->si_cdev.dev); device_destroy(class, dd->si_cdev.dev);
506 527 cdev_del(&dd->si_cdev); cdev_del(&dd->si_cdev);
528 ida_simple_remove(&ida, dd->minor);
507 529
508 530 dce6_shutdown(dd->dce); dce6_shutdown(dd->dce);
509 531 pci_clear_master(dev); pci_clear_master(dev);
 
... ... static int __init init(void)
606 628 { {
607 629 int r; int r;
608 630
631 ida_init(&ida);
632
609 633 class = class_create(THIS_MODULE, "si"); class = class_create(THIS_MODULE, "si");
610 634 if (IS_ERR(class)) if (IS_ERR(class))
611 635 return PTR_ERR(class); return PTR_ERR(class);
612 636
613 r = alloc_chrdev_region(&devt, 0, 1, pci_driver.name);
637 r = alloc_chrdev_region(&devt_region, 0, GPUS_MAX, pci_driver.name);
614 638 if (r < 0) { if (r < 0) {
615 639 printk(KERN_ERR "%s:cannot allocate major/minor range\n", printk(KERN_ERR "%s:cannot allocate major/minor range\n",
616 640 pci_driver.name); pci_driver.name);
 
... ... static int __init init(void)
626 650 return 0; return 0;
627 651
628 652 chrdev_region_unregister: chrdev_region_unregister:
629 unregister_chrdev_region(devt, 1);
653 unregister_chrdev_region(devt_region, GPUS_MAX);
630 654
631 655 class_destroy: class_destroy:
632 656 class_destroy(class); class_destroy(class);
 
... ... class_destroy:
636 660 static void __exit cleanup(void) static void __exit cleanup(void)
637 661 { {
638 662 pci_unregister_driver(&pci_driver); pci_unregister_driver(&pci_driver);
639 unregister_chrdev_region(devt, 1);
663 unregister_chrdev_region(devt_region, GPUS_MAX);
640 664 class_destroy(class); class_destroy(class);
665 ida_destroy(&ida);
641 666 } }
642 667
643 668 module_init(init); module_init(init);
File drivers/gpu/alga/amd/si/drv.h changed (mode: 100644) (index 70234b6..9a20786)
... ... struct dev_drv_data {
39 39 struct rlc rlc; struct rlc rlc;
40 40
41 41 /* userland */ /* userland */
42 unsigned int minor;
42 43 struct cdev si_cdev; struct cdev si_cdev;
43 44 struct device *si_dev; struct device *si_dev;
44 struct pci_dev *dev;
45 struct pci_dev *dev;
45 46 }; };
46 47
47 48 u32 rr32(struct pci_dev *dev, unsigned offset); u32 rr32(struct pci_dev *dev, unsigned offset);
File drivers/gpu/alga/amd/si/fops.c changed (mode: 100644) (index 3b1d2bc..6a1577e)
33 33 #include "patterns/patterns.h" #include "patterns/patterns.h"
34 34 #endif #endif
35 35
36 dev_t devt; /* global to the driver */
36 dev_t devt_region; /* global to the driver */
37 37
38 38 static int open(struct inode *i, struct file *f) static int open(struct inode *i, struct file *f)
39 39 { {
File drivers/gpu/alga/amd/si/fops.h changed (mode: 100644) (index 736e636..bcad23c)
5 5 Protected by GNU Affero GPL v3 with some exceptions. Protected by GNU Affero GPL v3 with some exceptions.
6 6 See README at root of alga tree. See README at root of alga tree.
7 7 */ */
8 extern dev_t devt;
8 extern dev_t devt_region;
9 9 extern struct file_operations fops; extern struct file_operations fops;
10 10 #endif #endif
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/linux-gpu-amd-si

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/linux-gpu-amd-si

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/linux-gpu-amd-si

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main