summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics/wayland
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-08-24 12:04:01 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-09-01 12:20:04 +0000
commit0584467980142415294a44fc7049c187580603f5 (patch)
treec29a8d67aad48c03a0b341ce04fe63257805d630 /meta-agl-core/recipes-graphics/wayland
parented74c2179101fd256611c1354a06363532b498f8 (diff)
weston_10.0_aglcore.inc: Update wl_output to version 4
This allows clients to query the output name and description name as seen by the compositor. Previously this was only possible only with xdg_output_manager extension but a recent update to the core wayland protocol allows us to do just that. Patch is posted upstream https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/987, but will take some time to get in, as we're in the process of a release. Bug-AGL: SPEC-4530 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I709b941a220e9906078944ee585435df7141d448 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27949 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland')
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch115
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc4
2 files changed, 118 insertions, 1 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch
new file mode 100644
index 000000000..46e305d12
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch
@@ -0,0 +1,115 @@
+From 5361d157ff6b11d5cb7a9f989abe5f376c9e2efa Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 24 Aug 2022 11:43:06 +0300
+Subject: [PATCH] libweston: Send name,description, update wl_output to ver 4
+
+These have been in wayland a while back with version 1.20.0.
+
+We also need to update the test client helper with this bump, as
+those bind to version 4.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ libweston/compositor.c | 14 +++++++++++++-
+ tests/weston-test-client-helper.c | 18 ++++++++++++++++++
+ tests/weston-test-client-helper.h | 2 ++
+ 3 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/libweston/compositor.c b/libweston/compositor.c
+index 1670c50..af7c71e 100644
+--- a/libweston/compositor.c
++++ b/libweston/compositor.c
+@@ -184,6 +184,12 @@ weston_mode_switch_send_events(struct weston_head *head,
+ if (version >= WL_OUTPUT_SCALE_SINCE_VERSION && scale_changed)
+ wl_output_send_scale(resource, output->current_scale);
+
++ if (version >= WL_OUTPUT_NAME_SINCE_VERSION)
++ wl_output_send_name(resource, head->name);
++
++ if (version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION)
++ wl_output_send_description(resource, head->model);
++
+ if (version >= WL_OUTPUT_DONE_SINCE_VERSION)
+ wl_output_send_done(resource);
+ }
+@@ -5198,6 +5204,12 @@ bind_output(struct wl_client *client,
+ mode->refresh);
+ }
+
++ if (version >= WL_OUTPUT_NAME_SINCE_VERSION)
++ wl_output_send_name(resource, head->name);
++
++ if (version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION)
++ wl_output_send_description(resource, head->model);
++
+ if (version >= WL_OUTPUT_DONE_SINCE_VERSION)
+ wl_output_send_done(resource);
+ }
+@@ -5206,7 +5218,7 @@ static void
+ weston_head_add_global(struct weston_head *head)
+ {
+ head->global = wl_global_create(head->compositor->wl_display,
+- &wl_output_interface, 3,
++ &wl_output_interface, 4,
+ head, bind_output);
+ }
+
+diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
+index 01c4b80..8369c40 100644
+--- a/tests/weston-test-client-helper.c
++++ b/tests/weston-test-client-helper.c
+@@ -715,6 +715,20 @@ output_handle_scale(void *data,
+ output->scale = scale;
+ }
+
++static void
++output_handle_name(void *data, struct wl_output *wl_output, const char *name)
++{
++ struct output *output = data;
++ output->name = strdup(name);
++}
++
++static void
++output_handle_description(void *data, struct wl_output *wl_output, const char *desc)
++{
++ struct output *output = data;
++ output->name = strdup(desc);
++}
++
+ static void
+ output_handle_done(void *data,
+ struct wl_output *wl_output)
+@@ -729,6 +743,8 @@ static const struct wl_output_listener output_listener = {
+ output_handle_mode,
+ output_handle_done,
+ output_handle_scale,
++ output_handle_name,
++ output_handle_description,
+ };
+
+ static void
+@@ -737,6 +753,8 @@ output_destroy(struct output *output)
+ assert(wl_proxy_get_version((struct wl_proxy *)output->wl_output) >= 3);
+ wl_output_release(output->wl_output);
+ wl_list_remove(&output->link);
++ free(output->name);
++ free(output->desc);
+ free(output);
+ }
+
+diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
+index 8e1505d..9e05009 100644
+--- a/tests/weston-test-client-helper.h
++++ b/tests/weston-test-client-helper.h
+@@ -163,6 +163,8 @@ struct output {
+ int height;
+ int scale;
+ int initialized;
++ char *name;
++ char *desc;
+ };
+
+ struct buffer {
+--
+2.35.1
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc
index 6cd2ce17a..0e09ca528 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc
+++ b/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc
@@ -6,6 +6,8 @@ PACKAGECONFIG[headless] = "-Dbackend-headless=true"
PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}"
PACKAGECONFIG:append = "${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', ' remoting', '', d)}"
-SRC_URI:append = "file://0001-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch"
+SRC_URI:append = "file://0001-libweston-Send-name-description-update-wl_output-to-.patch \
+ file://0001-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch"
+
# seat management is only for waltham-transmitter-plugin
SRC_URI:append = "${@bb.utils.contains('AGL_FEATURES', 'waltham-remoting', ' file://0001-libweston-Migrate-weston_seat_init-release-to-public.patch', '', d)}"
id='n455' href='#n455'>455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778